pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1827698 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Date Sun, 25 Mar 2018 08:56:34 GMT
Author: tilman
Date: Sun Mar 25 08:56:34 2018
New Revision: 1827698

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

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java?rev=1827698&r1=1827697&r2=1827698&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Sun Mar 25 08:56:34 2018
@@ -385,9 +385,9 @@ final class SampledImageReader
             {
                 // we just need to copy all sample data, then convert to RGB image.
                 long inputResult = input.read(bank);
-                if (inputResult != width * height * numComponents)
+                if (inputResult != width * height * (long) numComponents)
                 {
-                    LOG.debug("Tried reading " + width * height * numComponents + " bytes
but only " + inputResult + " bytes read");
+                    LOG.debug("Tried reading " + width * height * (long) numComponents +
" bytes but only " + inputResult + " bytes read");
                 }
                 return pdImage.getColorSpace().toRGBImage(raster);
             }



Mime
View raw message