pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1857171 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
Date Tue, 09 Apr 2019 11:43:18 GMT
Author: tilman
Date: Tue Apr  9 11:43:18 2019
New Revision: 1857171

URL: http://svn.apache.org/viewvc?rev=1857171&view=rev
Log:
PDFBOX-4509: SonarQube fix

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java?rev=1857171&r1=1857170&r2=1857171&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java Tue
Apr  9 11:43:18 2019
@@ -713,12 +713,10 @@ public final class PDResources implement
         {
             for (Map.Entry<COSName, COSBase> entry : dict.entrySet())
             {
-                if (entry.getValue() instanceof COSObject)
+                if (entry.getValue() instanceof COSObject &&
+                    object.getCOSObject() == ((COSObject) entry.getValue()).getObject())
                 {
-                    if (object.getCOSObject() == ((COSObject) entry.getValue()).getObject())
-                    {
-                        return entry.getKey();
-                    }
+                    return entry.getKey();
                 }
             }
         }



Mime
View raw message