pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1733495 - /pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java
Date Thu, 03 Mar 2016 17:04:42 GMT
Author: tilman
Date: Thu Mar  3 17:04:41 2016
New Revision: 1733495

URL: http://svn.apache.org/viewvc?rev=1733495&view=rev
Log:
PDFBOX-2852: avoid NPE

Modified:
    pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java

Modified: pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java?rev=1733495&r1=1733494&r2=1733495&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java (original)
+++ pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java Thu Mar  3 17:04:41
2016
@@ -117,6 +117,11 @@ public class DateType extends AbstractSi
     {
         if (!isGoodType(value))
         {
+            if (value == null)
+            {
+                throw new IllegalArgumentException(
+                        "Value null is not allowed for the Date type");
+            }
             throw new IllegalArgumentException(
                     "Value given is not allowed for the Date type: " 
                             + value.getClass() + ", value: " + value);



Mime
View raw message