pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java?rev=1857170&r1=1857169&r2=1857170&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
(original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
Tue Apr  9 11:43:13 2019
@@ -712,12 +712,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