pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1813086&r1=1813085&r2=1813086&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Mon Oct 23
20:28:41 2017
@@ -2137,7 +2137,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);
             }
@@ -2149,7 +2149,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