]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix for NullPointerException when xmp:ModifyDate isn't set in the FO metadata.
authorJeremias Maerki <jeremias@apache.org>
Wed, 21 Jun 2006 13:06:58 +0000 (13:06 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 21 Jun 2006 13:06:58 +0000 (13:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@415981 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/pdf/PDFMetadata.java

index 5a4d20d5d6942aee7e8a2179438f518511d43189..e767cbf1b9825b7a6cd5c34c2049811e3df68893 100644 (file)
@@ -234,7 +234,9 @@ public class PDFMetadata extends PDFStream {
         //than Info/CreationDate
         info.setCreationDate(d);
         d = xmpBasic.getModifyDate();
-        xmpBasic.setModifyDate(d);
-        info.setModDate(d);
+        if (d != null) { //ModifyDate is only required for PDF/X
+            xmpBasic.setModifyDate(d);
+            info.setModDate(d);
+        }
     }
 }