You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/08/23 17:48:58 UTC

svn commit: r1757414 - in /pdfbox/branches/2.0: preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java

Author: tilman
Date: Tue Aug 23 17:48:58 2016
New Revision: 1757414

URL: http://svn.apache.org/viewvc?rev=1757414&view=rev
Log:
PDFBOX-3472: avoid NPE as proposed by Petras; improve javadoc

Modified:
    pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
    pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java

Modified: pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java?rev=1757414&r1=1757413&r2=1757414&view=diff
==============================================================================
--- pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java (original)
+++ pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java Tue Aug 23 17:48:58 2016
@@ -82,7 +82,7 @@ public class PDFAIdentificationValidatio
             }
         }
         checkConformanceLevel(ve, id.getConformance());
-        checkPartNumber(ve, id.getPart());
+        checkPartNumber(ve, id.getPart() == null ?  -1 : id.getPart());
         return ve;
     }
 

Modified: pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java?rev=1757414&r1=1757413&r2=1757414&view=diff
==============================================================================
--- pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java (original)
+++ pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java Tue Aug 23 17:48:58 2016
@@ -190,7 +190,7 @@ public class PDFAIdentificationSchema ex
     /**
      * Give the PDFAVersionId (as an integer)
      * 
-     * @return Part value (Integer)
+     * @return Part value (Integer) or null if it is missing
      */
     public Integer getPart()
     {