pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1827694 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Date Sun, 25 Mar 2018 05:41:49 GMT
Author: msahyoun
Date: Sun Mar 25 05:41:49 2018
New Revision: 1827694

URL: http://svn.apache.org/viewvc?rev=1827694&view=rev
Log:
PDFBOX-4071: Sonar fix: when expecting a long one of the parameters needs to be a long

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java?rev=1827694&r1=1827693&r2=1827694&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Sun Mar 25 05:41:49 2018
@@ -363,7 +363,7 @@ final class SampledImageReader
             {
                 // we just need to copy all sample data, then convert to RGB image.
                 long inputResult = input.read(bank);
-                if (Long.compare(inputResult, width * height * numComponents) != 0)
+                if (Long.compare(inputResult, width * height * (int) numComponents) != 0)
                 {
                     LOG.debug("Tried reading " + width * height * numComponents + " bytes
but only " + inputResult + " bytes read");
                 }



Mime
View raw message