The test for an unrecognized literal type was in a place where it could only throw a NullPointerException

This commit is contained in:
jeb228 2011-02-07 19:02:19 +00:00
parent 1b2f7bdf61
commit f0c7ab7b95

View file

@ -1114,7 +1114,12 @@ public class InputElementFormattingTag extends TagSupport {
} else if ( valueFromLiteral instanceof XSDDateTime) {
strFromLit = date.getLexicalForm();
log.debug("found existing literal of type XSDDateTime for field " + fieldName);
} else {
log.error("found an existing value for field " + fieldName
+ "but it was not a String or Date:"
+ valueFromLiteral.getClass().getName());
}
if( dateFromLit != null ){
dt = new DateTime(dateFromLit);
}else{
@ -1122,9 +1127,6 @@ public class InputElementFormattingTag extends TagSupport {
//dt = new DateTime( dtFmt.parseDateTime(strFromLit) );
dt = new DateTime( strFromLit );
}
} else {
log.error("found an existing value from the editConfig but it was not a String or Date:");
log.error(valueFromLiteral.getClass().getName());
}
}else{
//No EditSubmission found, try to get default value from EditConfig