pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1827700 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java
Date Sun, 25 Mar 2018 09:03:42 GMT
Author: tilman
Date: Sun Mar 25 09:03:41 2018
New Revision: 1827700

URL: http://svn.apache.org/viewvc?rev=1827700&view=rev
Log:
PDFBOX-4071: Sonar fix: put delcarations on separate lines; remove uneeded (); remove unneeded
method

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java?rev=1827700&r1=1827699&r2=1827700&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java Sun Mar
25 09:03:41 2018
@@ -308,7 +308,10 @@ public final class Predictor
         // current predictor type
         private int predictor;
         // image decode parameters
-        private final int colors, bitsPerComponent, columns, rowLength;
+        private final int colors;
+        private final int bitsPerComponent;
+        private final int columns;
+        private final int rowLength;
         // PNG predictor (predictor>=10) means every row has a (potentially different)
         // predictor value
         private final boolean predictorPerRow;
@@ -328,7 +331,7 @@ public final class Predictor
             this.bitsPerComponent = bitsPerComponent;
             this.columns = columns;
             this.rowLength = calculateRowLength(colors, bitsPerComponent, columns);
-            this.predictorPerRow = (predictor >= 10);
+            this.predictorPerRow = predictor >= 10;
             currentRow = new byte[rowLength];
             lastRow = new byte[rowLength];
         }
@@ -403,12 +406,6 @@ public final class Predictor
         }
 
         @Override
-        public void close() throws IOException
-        {
-            super.close();
-        }
-
-        @Override
         public void write(int i) throws IOException
         {
             throw new UnsupportedOperationException("Not supported");



Mime
View raw message