NIHVIVO-3113 fix values for null objects in dump

This commit is contained in:
ryounes 2011-08-09 23:20:42 +00:00
parent da8c374676
commit 8e53069ec5
2 changed files with 9 additions and 9 deletions

View file

@ -82,8 +82,8 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
}
enum Value {
NULL("<null>"),
UNDEFINED("<undefined>");
NULL("[null]"),
UNDEFINED("[undefined]");
private final String value;
@ -156,7 +156,7 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
Map<String, Object> value = new HashMap<String, Object>();
if (model == null) {
value.put(Key.VALUE.toString(), Value.UNDEFINED);
value.put(Key.VALUE.toString(), Value.UNDEFINED.toString());
// TemplateMethodModel and TemplateDirectiveModel objects can only be
// included in the data model at the top level.
@ -228,7 +228,7 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
map.putAll( getTemplateModelDump( (TemplateModel)model ) );
}
} else {
map.put(Key.VALUE.toString(), Value.NULL);
map.put(Key.VALUE.toString(), Value.NULL.toString());
}
return map;