Adding more unit tests for EditN3Generator. Dealing with literals better

This commit is contained in:
briancaruso 2011-11-18 17:07:52 +00:00
parent 5ddd6fecad
commit 876e2d97f1
3 changed files with 74 additions and 5 deletions

View file

@ -385,7 +385,8 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
// and other unusual places that can cause problems.
Class<?> c = method.getDeclaringClass();
if (c.equals(java.lang.Object.class) ||
if (c == null ||
c.equals(java.lang.Object.class) ||
c.equals(java.lang.reflect.Constructor.class) ||
c.equals(java.lang.reflect.Field.class ) )
continue;
@ -416,7 +417,8 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
TemplateModel value = model.get(propertyName);
properties.put(propertyName, getDump(value));
}catch(Throwable th){
log.error("problem dumping " + propertyName + " on " + object.getClass().getName(), th);
log.error("problem dumping " + propertyName + " on " + object.getClass().getName() +
" declared in " + c.getName(), th);
}
continue;
}