[ 
https://issues.apache.org/jira/browse/PDFBOX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Hilpert updated PDFBOX-823:
----------------------------------

    Comment: was deleted

(was: Ha: the FoxIt Reader "Document Properties" window also has a butten 
"More...". If I click it, a new window "Properties of <file name>" shows up - 
it's tab "PDF" also shows the old/wrong title (set by Apache FOP PDF 
generation) , but the new creator set by PDFBOx ...!?!?

So, there really seems to be multiple "PDF properties"?)

> NullPointerException in DateConverter.toISO8601(DateConverter.java:221)
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-823
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.2.1
>         Environment: JDK 1.6.0_21, Windows XP 32 Bit
>            Reporter: Martin Hilpert
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to