commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1432214 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging: common/ formats/tiff/ formats/tiff/datareaders/ palette/
Date Fri, 11 Jan 2013 18:30:09 GMT
Author: ggregory
Date: Fri Jan 11 18:30:08 2013
New Revision: 1432214

URL: http://svn.apache.org/viewvc?rev=1432214&view=rev
Log:
Add final modifier to method parameters.

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorComponent.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/MedianCutMostPopulatedBoxesImplementation.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
Fri Jan 11 18:30:08 2013
@@ -148,7 +148,7 @@ public class ImageBuilder {
      * @throws RasterFormatException f the specified area is not contained 
      *         within this ImageBuilder
      */
-    public BufferedImage getSubimage(int x, int y, int w, int h)
+    public BufferedImage getSubimage(final int x, final int y, final int w, final int h)
     {
         if (w <= 0) {
             throw new RasterFormatException("negative or zero subimage width");
@@ -187,7 +187,7 @@ public class ImageBuilder {
     }
 
     private BufferedImage makeBufferedImage(
-            int[] argb, int w, int h, boolean useAlpha)
+            final int[] argb, final int w, final int h, final boolean useAlpha)
     {
         ColorModel colorModel;
         WritableRaster raster;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
Fri Jan 11 18:30:08 2013
@@ -506,7 +506,7 @@ public class TiffImageParser extends Ima
     }
 
     private Integer getIntegerParameter(
-            String key, Map<String, Object>params)
+            final String key, final Map<String, Object>params)
             throws ImageReadException
     {
        
@@ -524,7 +524,7 @@ public class TiffImageParser extends Ima
     }
     
     private Rectangle checkForSubImage(
-            Map<String, Object> params)
+            final Map<String, Object> params)
             throws ImageReadException
     {
         Integer ix0, iy0, iwidth, iheight;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
Fri Jan 11 18:30:08 2013
@@ -229,7 +229,7 @@ public final class DataReaderStrips exte
     
     
     @Override
-    public BufferedImage readImageData(Rectangle subImage)
+    public BufferedImage readImageData(final Rectangle subImage)
             throws ImageReadException, IOException
     {
         // the legacy code is optimized to the reading of whole

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorComponent.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorComponent.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorComponent.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorComponent.java
Fri Jan 11 18:30:08 2013
@@ -19,25 +19,25 @@ package org.apache.commons.imaging.palet
 enum ColorComponent {
     ALPHA {
         @Override
-        public int argbComponent(int argb) {
+        public int argbComponent(final int argb) {
             return (argb >> 24) & 0xff;
         }
     },
     RED {
         @Override
-        public int argbComponent(int argb) {
+        public int argbComponent(final int argb) {
             return (argb >> 16) & 0xff;
         }
     },
     GREEN {
         @Override
-        public int argbComponent(int argb) {
+        public int argbComponent(final int argb) {
             return (argb >> 8) & 0xff;
         }
     },
     BLUE {
         @Override
-        public int argbComponent(int argb) {
+        public int argbComponent(final int argb) {
             return (argb & 0xff);
         }
     };

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
Fri Jan 11 18:30:08 2013
@@ -21,7 +21,7 @@ import java.awt.image.BufferedImage;
 import org.apache.commons.imaging.ImageWriteException;
 
 public class Dithering {
-    public static void applyFloydSteinbergDithering(BufferedImage image, Palette palette)
throws ImageWriteException {
+    public static void applyFloydSteinbergDithering(final BufferedImage image, final Palette
palette) throws ImageWriteException {
         for (int y = 0; y < image.getHeight(); y++) {
             for (int x = 0; x < image.getWidth(); x++) {
                 int argb = image.getRGB(x, y);
@@ -65,7 +65,7 @@ public class Dithering {
         }
     }
     
-    private static int adjustPixel(int argb, int errA, int errR, int errG, int errB, int
mul) {
+    private static int adjustPixel(final int argb, final int errA, final int errR, final
int errG, final int errB, final int mul) {
         int a = (argb >> 24) & 0xff;
         int r = (argb >> 16) & 0xff;
         int g = (argb >> 8) & 0xff;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/MedianCutMostPopulatedBoxesImplementation.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/MedianCutMostPopulatedBoxesImplementation.java?rev=1432214&r1=1432213&r2=1432214&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/MedianCutMostPopulatedBoxesImplementation.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/MedianCutMostPopulatedBoxesImplementation.java
Fri Jan 11 18:30:08 2013
@@ -26,7 +26,7 @@ import org.apache.commons.imaging.ImageW
 public class MedianCutMostPopulatedBoxesImplementation extends MedianCutImplementation {
     @Override
     public boolean performNextMedianCut(final List<ColorGroup> colorGroups,
-            boolean ignoreAlpha) throws ImageWriteException {
+            final boolean ignoreAlpha) throws ImageWriteException {
         int maxPoints = 0;
         ColorGroup colorGroup = null;
         for (int i = 0; i < colorGroups.size(); i++) {
@@ -137,7 +137,7 @@ public class MedianCutMostPopulatedBoxes
     private static class ColorComparer implements Comparator<ColorCount> {
         private final ColorComponent colorComponent;
         
-        public ColorComparer(ColorComponent colorComponent) {
+        public ColorComparer(final ColorComponent colorComponent) {
             this.colorComponent = colorComponent;
         }
         



Mime
View raw message