From 969876494ed1a289301d2efc7c81f640c986c821 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 21 Jun 2006 13:06:58 +0000 Subject: 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 --- src/java/org/apache/fop/pdf/PDFMetadata.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); + } } } -- cgit v1.2.3