pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1647204 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java
Date Sun, 21 Dec 2014 20:24:28 GMT
Author: tilman
Date: Sun Dec 21 20:24:28 2014
New Revision: 1647204

URL: http://svn.apache.org/r1647204
Log:
PDFBOX-2576: lastSectiion is never null

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java?rev=1647204&r1=1647203&r2=1647204&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ConformingPDFParser.java
Sun Dec 21 20:24:28 2014
@@ -314,7 +314,7 @@ public class ConformingPDFParser extends
         } else if(">>".equals(lastSection)) {
             // dictionary
             throw new RuntimeException("Not yet implemented");
-        } else if(lastSection != null && lastSection.endsWith("]")) {
+        } else if(lastSection.endsWith("]")) {
             // array
             COSArray array = new COSArray();
             lastSection = lastSection.replaceAll("]$", "");
@@ -327,7 +327,7 @@ public class ConformingPDFParser extends
             if(lastSection.matches("^\\s*<.*>\\s*$")) // it's a hex string
                 array.add(COSString.parseHex(lastSection.replaceAll("^\\s*<", "").replaceAll(">\\s*$",
"")));
             obj = array;
-        } else if(lastSection != null && lastSection.endsWith(">")) {
+        } else if(lastSection.endsWith(">")) {
             // string of hex codes
             obj = processCosObject(lastSection);
         } else {



Mime
View raw message