pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1813087 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Mon, 23 Oct 2017 20:28:46 GMT
Author: tilman
Date: Mon Oct 23 20:28:45 2017
New Revision: 1813087

URL: http://svn.apache.org/viewvc?rev=1813087&view=rev
Log:
PDFBOX-2852: instanceof doesn't need null check

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1813087&r1=1813086&r2=1813087&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Mon
Oct 23 20:28:45 2017
@@ -2148,7 +2148,7 @@ public class COSParser extends BaseParse
         {
             // check if all page objects are dereferenced
             COSBase pages = root.getDictionaryObject(COSName.PAGES);
-            if (pages != null && pages instanceof COSDictionary)
+            if (pages instanceof COSDictionary)
             {
                 checkPagesDictionary((COSDictionary) pages);
             }
@@ -2160,7 +2160,7 @@ public class COSParser extends BaseParse
         // check for kids
         COSBase kids = pagesDict.getDictionaryObject(COSName.KIDS);
         int numberOfPages = 0;
-        if (kids != null && kids instanceof COSArray)
+        if (kids instanceof COSArray)
         {
             COSArray kidsArray = (COSArray) kids;
             List<? extends COSBase> kidsList = kidsArray.toList();



Mime
View raw message