From: Jeremias Maerki Date: Wed, 21 Jun 2006 13:06:58 +0000 (+0000) Subject: Bugfix for NullPointerException when xmp:ModifyDate isn't set in the FO metadata. X-Git-Tag: fop-0_93~181 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=969876494ed1a289301d2efc7c81f640c986c821;p=xmlgraphics-fop.git Bugfix for NullPointerException when xmp:ModifyDate isn't set in the FO metadata. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@415981 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/pdf/PDFMetadata.java b/src/java/org/apache/fop/pdf/PDFMetadata.java index 5a4d20d5d..e767cbf1b 100644 --- a/src/java/org/apache/fop/pdf/PDFMetadata.java +++ b/src/java/org/apache/fop/pdf/PDFMetadata.java @@ -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); + } } }