pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1825813 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
Date Sun, 04 Mar 2018 13:20:02 GMT
Author: tilman
Date: Sun Mar  4 13:20:02 2018
New Revision: 1825813

URL: http://svn.apache.org/viewvc?rev=1825813&view=rev
Log:
PDFBOX-3340: Sonar fix

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java?rev=1825813&r1=1825812&r2=1825813&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
Sun Mar  4 13:20:02 2018
@@ -127,7 +127,7 @@ public final class PDImageXObject extend
         super(stream, COSName.IMAGE);
         this.resources = resources;
         List<COSName> filters = stream.getFilters();
-        if (filters != null && filters.size() > 0 && COSName.JPX_DECODE.equals(filters.get(filters.size()-1)))
+        if (filters != null && !filters.isEmpty() && COSName.JPX_DECODE.equals(filters.get(filters.size()-1)))
         {
             try (COSInputStream is = stream.createInputStream())
             {



Mime
View raw message