pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1809343 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
Date Fri, 22 Sep 2017 19:18:16 GMT
Author: tilman
Date: Fri Sep 22 19:18:16 2017
New Revision: 1809343

URL: http://svn.apache.org/viewvc?rev=1809343&view=rev
Log:
PDFBOX-2852: combine if statements

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=1809343&r1=1809342&r2=1809343&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 Fri
Sep 22 19:18:16 2017
@@ -408,13 +408,9 @@ public final class PDResources implement
         {
             xobject = PDXObject.createXObject(value, this);
         }
-
-        if (cache != null)
+        if (cache != null && isAllowedCache(xobject))
         {
-            if (isAllowedCache(xobject))
-            {
-                cache.put(indirect, xobject);
-            }
+            cache.put(indirect, xobject);
         }
         return xobject;
     }



Mime
View raw message