pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1865488 - /pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
Date Mon, 19 Aug 2019 16:45:11 GMT
Author: tilman
Date: Mon Aug 19 16:45:11 2019
New Revision: 1865488

URL: http://svn.apache.org/viewvc?rev=1865488&view=rev
Log:
PDFBOX-4071: simplify code

Modified:
    pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java

Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java?rev=1865488&r1=1865487&r2=1865488&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java Mon
Aug 19 16:45:11 2019
@@ -459,12 +459,8 @@ public class COSArray extends COSBase im
         for (int i = 0; retval < 0 && i < this.size(); i++)
         {
             COSBase item = this.get(i);
-            if (item.equals(object))
-            {
-                retval = i;
-                break;
-            }
-            else if (item instanceof COSObject && ((COSObject) item).getObject().equals(object))
+            if (item.equals(object) ||
+                item instanceof COSObject && ((COSObject) item).getObject().equals(object))
             {
                 retval = i;
                 break;



Mime
View raw message