Details
Description
I tried to add metadata as shown in AddMetadataFromDocInfo.java. There's also the line
basicSchema.setModifyDate( info.getModificationDate() );
but I get a NullPointerException at this line:
java.lang.NullPointerException
at org.apache.jempbox.impl.DateConverter.toISO8601(DateConverter.java:221)
at org.apache.jempbox.xmp.XMPSchema.setDateProperty(XMPSchema.java:249)
at org.apache.jempbox.xmp.XMPSchemaBasic.setModifyDate(XMPSchemaBasic.java:266)
because the info.getModificationDate() returns null. It would be better to catch null parameters in the metadata set methods.
Workaround:
if (pddi.getModificationDate() != null)
{ basicSchema.setModifyDate(pddi.getModificationDate()); }//else: avoid NPE