commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1417043 [18/21] - in /commons/proper/imaging/trunk/src: main/java/org/apache/commons/imaging/ main/java/org/apache/commons/imaging/color/ main/java/org/apache/commons/imaging/common/ main/java/org/apache/commons/imaging/common/bytesource/ ...
Date Tue, 04 Dec 2012 17:24:32 GMT
Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/color/ColorConversionsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/color/ColorConversionsTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/color/ColorConversionsTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/color/ColorConversionsTest.java Tue Dec  4 17:23:16 2012
@@ -26,11 +26,11 @@ public class ColorConversionsTest extend
             0xff00ffff, 0x00000000, 0xff7f7f7f, };
 
     public void testRGBtoCMYK() throws Exception {
-        for (int rgb : SAMPLE_RGBS) {
-            ColorCmy cmy = ColorConversions.convertRGBtoCMY(rgb);
-            ColorCmyk cmyk = ColorConversions.convertCMYtoCMYK(cmy);
-            ColorCmy cmyk_cmy = ColorConversions.convertCMYKtoCMY(cmyk);
-            int cmyk_cmy_rgb = ColorConversions.convertCMYtoRGB(cmyk_cmy);
+        for (final int rgb : SAMPLE_RGBS) {
+            final ColorCmy cmy = ColorConversions.convertRGBtoCMY(rgb);
+            final ColorCmyk cmyk = ColorConversions.convertCMYtoCMYK(cmy);
+            final ColorCmy cmyk_cmy = ColorConversions.convertCMYKtoCMY(cmyk);
+            final int cmyk_cmy_rgb = ColorConversions.convertCMYtoRGB(cmyk_cmy);
 
             Debug.debug("cmy", cmy);
             Debug.debug("cmyk", cmyk);
@@ -44,9 +44,9 @@ public class ColorConversionsTest extend
     }
 
     public void testRGBtoHSL() throws Exception {
-        for (int rgb : SAMPLE_RGBS) {
-            ColorHsl hsl = ColorConversions.convertRGBtoHSL(rgb);
-            int hsl_rgb = ColorConversions.convertHSLtoRGB(hsl);
+        for (final int rgb : SAMPLE_RGBS) {
+            final ColorHsl hsl = ColorConversions.convertRGBtoHSL(rgb);
+            final int hsl_rgb = ColorConversions.convertHSLtoRGB(hsl);
 
             Debug.debug("hsl", hsl);
             Debug.debug("hsl_rgb",
@@ -57,9 +57,9 @@ public class ColorConversionsTest extend
     }
 
     public void testRGBtoHSV() throws Exception {
-        for (int rgb : SAMPLE_RGBS) {
-            ColorHsv hsv = ColorConversions.convertRGBtoHSV(rgb);
-            int hsv_rgb = ColorConversions.convertHSVtoRGB(hsv);
+        for (final int rgb : SAMPLE_RGBS) {
+            final ColorHsv hsv = ColorConversions.convertRGBtoHSV(rgb);
+            final int hsv_rgb = ColorConversions.convertHSVtoRGB(hsv);
 
             Debug.debug("hsv", hsv);
             Debug.debug("hsv_rgb",
@@ -70,9 +70,9 @@ public class ColorConversionsTest extend
     }
 
     public void testXYZ() throws Exception {
-        for (int rgb : SAMPLE_RGBS) {
-            ColorXyz xyz = ColorConversions.convertRGBtoXYZ(rgb);
-            int xyz_rgb = ColorConversions.convertXYZtoRGB(xyz);
+        for (final int rgb : SAMPLE_RGBS) {
+            final ColorXyz xyz = ColorConversions.convertRGBtoXYZ(rgb);
+            final int xyz_rgb = ColorConversions.convertXYZtoRGB(xyz);
 
             Debug.debug();
             Debug.debug("rgb", rgb + " (" + Integer.toHexString(rgb) + ")");
@@ -82,9 +82,9 @@ public class ColorConversionsTest extend
 
             assertEquals((0xffffff & xyz_rgb), (0xffffff & rgb));
 
-            ColorCieLab cielab = ColorConversions.convertXYZtoCIELab(xyz);
-            ColorXyz cielab_xyz = ColorConversions.convertCIELabtoXYZ(cielab);
-            int cielab_xyz_rgb = ColorConversions.convertXYZtoRGB(cielab_xyz);
+            final ColorCieLab cielab = ColorConversions.convertXYZtoCIELab(xyz);
+            final ColorXyz cielab_xyz = ColorConversions.convertCIELabtoXYZ(cielab);
+            final int cielab_xyz_rgb = ColorConversions.convertXYZtoRGB(cielab_xyz);
 
             Debug.debug("cielab", cielab);
             Debug.debug("cielab_xyz", cielab_xyz);
@@ -94,11 +94,11 @@ public class ColorConversionsTest extend
 
             assertEquals((0xffffff & cielab_xyz_rgb), (0xffffff & rgb));
 
-            ColorHunterLab hunterlab = ColorConversions
+            final ColorHunterLab hunterlab = ColorConversions
                     .convertXYZtoHunterLab(xyz);
-            ColorXyz hunterlab_xyz = ColorConversions
+            final ColorXyz hunterlab_xyz = ColorConversions
                     .convertHunterLabtoXYZ(hunterlab);
-            int hunterlab_xyz_rgb = ColorConversions
+            final int hunterlab_xyz_rgb = ColorConversions
                     .convertXYZtoRGB(hunterlab_xyz);
 
             Debug.debug("hunterlab", hunterlab);
@@ -110,15 +110,15 @@ public class ColorConversionsTest extend
 
             assertEquals((0xffffff & hunterlab_xyz_rgb), (0xffffff & rgb));
 
-            ColorCieLch cielch = ColorConversions.convertCIELabtoCIELCH(cielab);
-            ColorCieLab cielch_cielab = ColorConversions
+            final ColorCieLch cielch = ColorConversions.convertCIELabtoCIELCH(cielab);
+            final ColorCieLab cielch_cielab = ColorConversions
                     .convertCIELCHtoCIELab(cielch);
 
             Debug.debug("cielch", cielch);
             Debug.debug("cielch_cielab", cielch_cielab);
 
-            ColorCieLuv cieluv = ColorConversions.convertXYZtoCIELuv(xyz);
-            ColorXyz cieluv_xyz = ColorConversions.convertCIELuvtoXYZ(cieluv);
+            final ColorCieLuv cieluv = ColorConversions.convertXYZtoCIELuv(xyz);
+            final ColorXyz cieluv_xyz = ColorConversions.convertCIELuvtoXYZ(cieluv);
 
             Debug.debug("cieluv", cieluv);
             Debug.debug("cieluv_xyz", cieluv_xyz);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/BinaryFileFunctionsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/BinaryFileFunctionsTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/BinaryFileFunctionsTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/BinaryFileFunctionsTest.java Tue Dec  4 17:23:16 2012
@@ -22,13 +22,13 @@ public class BinaryFileFunctionsTest ext
     // Work around that pesky "protected"...
     private static class Extender extends BinaryFileFunctions {
         public void testFloatToByteConversion() {
-            byte[] bytesLE = convertFloatToByteArray(1.0f,
+            final byte[] bytesLE = convertFloatToByteArray(1.0f,
                     ByteOrder.LITTLE_ENDIAN);
             assertEquals(
                     convertByteArrayToFloat("bytes", bytesLE,
                             ByteOrder.LITTLE_ENDIAN), 1.0f, 0f);
 
-            byte[] bytesBE = convertFloatToByteArray(1.0f,
+            final byte[] bytesBE = convertFloatToByteArray(1.0f,
                     ByteOrder.BIG_ENDIAN);
             assertEquals(
                     convertByteArrayToFloat("bytes", bytesBE,
@@ -36,13 +36,13 @@ public class BinaryFileFunctionsTest ext
         }
 
         public void testDoubleToByteConversion() {
-            byte[] bytesLE = BinaryConversions.toBytes(1.0,
+            final byte[] bytesLE = BinaryConversions.toBytes(1.0,
                     ByteOrder.LITTLE_ENDIAN);
             assertEquals(
                     convertByteArrayToDouble("bytes", bytesLE,
                             ByteOrder.LITTLE_ENDIAN), 1.0, 0);
 
-            byte[] bytesBE = BinaryConversions.toBytes(1.0,
+            final byte[] bytesBE = BinaryConversions.toBytes(1.0,
                     ByteOrder.BIG_ENDIAN);
             assertEquals(
                     convertByteArrayToDouble("bytes", bytesBE,

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/RationalNumberTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/RationalNumberTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/RationalNumberTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/RationalNumberTest.java Tue Dec  4 17:23:16 2012
@@ -32,7 +32,7 @@ public class RationalNumberTest extends 
     //    }
 
     public void test() {
-        double testValues[] = {
+        final double testValues[] = {
                 0, //
                 0.1, //
                 0.01, //
@@ -105,12 +105,12 @@ public class RationalNumberTest extends 
                 -(Long.MAX_VALUE - 0.1), //
         };
 
-        for (double value : testValues) {
-            RationalNumber rational = RationalNumberUtilities
+        for (final double value : testValues) {
+            final RationalNumber rational = RationalNumberUtilities
                     .getRationalNumber(value);
-            double difference = Math.abs(value - rational.doubleValue());
+            final double difference = Math.abs(value - rational.doubleValue());
 
-            NumberFormat nf = DecimalFormat.getInstance();
+            final NumberFormat nf = DecimalFormat.getInstance();
             nf.setMaximumFractionDigits(15);
 
             Debug.debug("value", nf.format(value));

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceDataTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceDataTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceDataTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceDataTest.java Tue Dec  4 17:23:16 2012
@@ -35,41 +35,41 @@ public class ByteSourceDataTest extends 
     }
 
     private class ByteSourceFileFactory implements ByteSourceFactory {
-        public ByteSource getByteSource(byte src[]) throws IOException {
-            File file = createTempFile(src);
+        public ByteSource getByteSource(final byte src[]) throws IOException {
+            final File file = createTempFile(src);
 
             // test that all bytes written to file.
             assertTrue(src.length == file.length());
 
-            ByteSource byteSource = new ByteSourceFile(file);
+            final ByteSource byteSource = new ByteSourceFile(file);
             return byteSource;
         }
     }
 
     private class ByteSourceInputStreamFileFactory implements ByteSourceFactory {
-        public ByteSource getByteSource(byte src[]) throws IOException {
-            File file = createTempFile(src);
+        public ByteSource getByteSource(final byte src[]) throws IOException {
+            final File file = createTempFile(src);
 
-            FileInputStream is = new FileInputStream(file);
+            final FileInputStream is = new FileInputStream(file);
 
-            ByteSource byteSource = new ByteSourceInputStream(is, null);
+            final ByteSource byteSource = new ByteSourceInputStream(is, null);
             return byteSource;
         }
     }
 
     private class ByteSourceInputStreamRawFactory implements ByteSourceFactory {
-        public ByteSource getByteSource(byte src[]) throws IOException {
-            ByteArrayInputStream is = new ByteArrayInputStream(src);
+        public ByteSource getByteSource(final byte src[]) throws IOException {
+            final ByteArrayInputStream is = new ByteArrayInputStream(src);
 
-            ByteSource byteSource = new ByteSourceInputStream(is, null);
+            final ByteSource byteSource = new ByteSourceInputStream(is, null);
             return byteSource;
         }
 
     }
 
-    protected void writeAndReadBytes(ByteSourceFactory byteSourceFactory,
-            byte src[]) throws IOException {
-        ByteSource byteSource = byteSourceFactory.getByteSource(src);
+    protected void writeAndReadBytes(final ByteSourceFactory byteSourceFactory,
+            final byte src[]) throws IOException {
+        final ByteSource byteSource = byteSourceFactory.getByteSource(src);
 
         // test cache during interrupted read cache by reading only first N
         // bytes.
@@ -77,8 +77,8 @@ public class ByteSourceDataTest extends 
             InputStream is = null;
             try {
                 is = byteSource.getInputStream();
-                byte prefix[] = new byte[256];
-                int read = is.read(prefix);
+                final byte prefix[] = new byte[256];
+                final int read = is.read(prefix);
 
                 assertTrue(read <= src.length);
                 for (int i = 0; i < read; i++) {
@@ -88,7 +88,7 @@ public class ByteSourceDataTest extends 
                 if (is != null) {
                     try {
                         is.close();
-                    } catch (IOException ignore) {
+                    } catch (final IOException ignore) {
                     }
                 }
             }
@@ -96,27 +96,27 @@ public class ByteSourceDataTest extends 
 
         // test cache by completely reading InputStream N times.
         for (int j = 0; j < 5; j++) {
-            InputStream is = byteSource.getInputStream();
-            byte dst[] = IoUtils.getInputStreamBytes(is);
+            final InputStream is = byteSource.getInputStream();
+            final byte dst[] = IoUtils.getInputStreamBytes(is);
 
             compareByteArrays(src, dst);
         }
 
         {
             // test getAll() method.
-            byte all[] = byteSource.getAll();
+            final byte all[] = byteSource.getAll();
             compareByteArrays(src, all);
         }
 
         if (src.length > 2) {
             // test optional start param to getInputStream()
 
-            int start = src.length / 2;
+            final int start = src.length / 2;
 
             InputStream is = null;
             try {
                 is = byteSource.getInputStream(start);
-                byte dst[] = IoUtils.getInputStreamBytes(is);
+                final byte dst[] = IoUtils.getInputStreamBytes(is);
 
                 assertTrue(src.length == dst.length + start);
                 for (int i = 0; i < dst.length; i++) {
@@ -126,7 +126,7 @@ public class ByteSourceDataTest extends 
                 if (is != null) {
                     try {
                         is.close();
-                    } catch (IOException ignored) {
+                    } catch (final IOException ignored) {
                     }
                 }
             }
@@ -135,15 +135,15 @@ public class ByteSourceDataTest extends 
     }
 
     public void test() throws Exception {
-        ByteSourceFactory byteSourceFactories[] = {
+        final ByteSourceFactory byteSourceFactories[] = {
                 new ByteSourceFileFactory(),
                 new ByteSourceInputStreamFileFactory(),
                 new ByteSourceInputStreamRawFactory(), };
 
-        byte testByteArrays[][] = getTestByteArrays();
+        final byte testByteArrays[][] = getTestByteArrays();
 
-        for (byte[] testByteArray : testByteArrays) {
-            for (ByteSourceFactory byteSourceFactory : byteSourceFactories) {
+        for (final byte[] testByteArray : testByteArrays) {
+            for (final ByteSourceFactory byteSourceFactory : byteSourceFactories) {
                 writeAndReadBytes(byteSourceFactory, testByteArray);
             }
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java Tue Dec  4 17:23:16 2012
@@ -38,17 +38,17 @@ import org.apache.commons.imaging.util.I
 public class ByteSourceImageTest extends ByteSourceTest {
 
     public void test() throws Exception {
-        List<File> imageFiles = getTestImages();
+        final List<File> imageFiles = getTestImages();
         for (int i = 0; i < imageFiles.size(); i++) {
             if (i % 1 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = imageFiles.get(i);
+            final File imageFile = imageFiles.get(i);
             Debug.debug("imageFile", imageFile);
             assertNotNull(imageFile);
 
-            byte imageFileBytes[] = IoUtils.getFileBytes(imageFile);
+            final byte imageFileBytes[] = IoUtils.getFileBytes(imageFile);
             assertNotNull(imageFileBytes);
             assertTrue(imageFileBytes.length == imageFile.length());
 
@@ -84,7 +84,7 @@ public class ByteSourceImageTest extends
 
             checkGetImageSize(imageFile, imageFileBytes);
 
-            ImageFormat imageFormat = Imaging.guessFormat(imageFile);
+            final ImageFormat imageFormat = Imaging.guessFormat(imageFile);
             if (ImageFormat.IMAGE_FORMAT_JPEG != imageFormat
                     && ImageFormat.IMAGE_FORMAT_UNKNOWN != imageFormat) {
                 checkGetBufferedImage(imageFile, imageFileBytes);
@@ -92,43 +92,43 @@ public class ByteSourceImageTest extends
         }
     }
 
-    public void checkGetBufferedImage(File file, byte[] bytes) throws Exception {
+    public void checkGetBufferedImage(final File file, final byte[] bytes) throws Exception {
         BufferedImage imageFile = Imaging.getBufferedImage(file);
         assertNotNull(imageFile);
         assertTrue(imageFile.getWidth() > 0);
         assertTrue(imageFile.getHeight() > 0);
-        int imageFileWidth = imageFile.getWidth();
-        int imageFileHeight = imageFile.getHeight();
+        final int imageFileWidth = imageFile.getWidth();
+        final int imageFileHeight = imageFile.getHeight();
         imageFile = null;
 
-        BufferedImage imageBytes = Imaging.getBufferedImage(bytes);
+        final BufferedImage imageBytes = Imaging.getBufferedImage(bytes);
         assertNotNull(imageBytes);
         assertTrue(imageFileWidth == imageBytes.getWidth());
         assertTrue(imageFileHeight == imageBytes.getHeight());
     }
 
-    public void checkGetImageSize(File imageFile, byte[] imageFileBytes)
+    public void checkGetImageSize(final File imageFile, final byte[] imageFileBytes)
             throws Exception {
-        Dimension imageSizeFile = Imaging.getImageSize(imageFile);
+        final Dimension imageSizeFile = Imaging.getImageSize(imageFile);
         assertNotNull(imageSizeFile);
         assertTrue(imageSizeFile.width > 0);
         assertTrue(imageSizeFile.height > 0);
 
-        Dimension imageSizeBytes = Imaging.getImageSize(imageFileBytes);
+        final Dimension imageSizeBytes = Imaging.getImageSize(imageFileBytes);
         assertNotNull(imageSizeBytes);
         assertTrue(imageSizeFile.width == imageSizeBytes.width);
         assertTrue(imageSizeFile.height == imageSizeBytes.height);
     }
 
-    public void checkGuessFormat(File imageFile, byte[] imageFileBytes)
+    public void checkGuessFormat(final File imageFile, final byte[] imageFileBytes)
             throws Exception {
         // check guessFormat()
-        ImageFormat imageFormatFile = Imaging.guessFormat(imageFile);
+        final ImageFormat imageFormatFile = Imaging.guessFormat(imageFile);
         assertNotNull(imageFormatFile);
         assertTrue(imageFormatFile != ImageFormat.IMAGE_FORMAT_UNKNOWN);
         // Debug.debug("imageFormatFile", imageFormatFile);
 
-        ImageFormat imageFormatBytes = Imaging.guessFormat(imageFileBytes);
+        final ImageFormat imageFormatBytes = Imaging.guessFormat(imageFileBytes);
         assertNotNull(imageFormatBytes);
         assertTrue(imageFormatBytes != ImageFormat.IMAGE_FORMAT_UNKNOWN);
         // Debug.debug("imageFormatBytes", imageFormatBytes);
@@ -136,12 +136,12 @@ public class ByteSourceImageTest extends
         assertTrue(imageFormatBytes == imageFormatFile);
     }
 
-    public void checkGetICCProfileBytes(File imageFile, byte[] imageFileBytes)
+    public void checkGetICCProfileBytes(final File imageFile, final byte[] imageFileBytes)
             throws Exception {
         // check guessFormat()
-        byte iccBytesFile[] = Imaging.getICCProfileBytes(imageFile);
+        final byte iccBytesFile[] = Imaging.getICCProfileBytes(imageFile);
 
-        byte iccBytesBytes[] = Imaging.getICCProfileBytes(imageFileBytes);
+        final byte iccBytesBytes[] = Imaging.getICCProfileBytes(imageFileBytes);
 
         assertTrue((iccBytesFile != null) == (iccBytesBytes != null));
 
@@ -152,27 +152,27 @@ public class ByteSourceImageTest extends
         compareByteArrays(iccBytesFile, iccBytesBytes);
     }
 
-    public void checkGetImageInfo(File imageFile, byte[] imageFileBytes)
+    public void checkGetImageInfo(final File imageFile, final byte[] imageFileBytes)
             throws IOException, ImageReadException, IllegalAccessException,
             IllegalArgumentException, InvocationTargetException {
-        Map<String,Object> params = new HashMap<String,Object>();
-        boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
-        ImageFormat imageFormat = Imaging.guessFormat(imageFile);
+        final Map<String,Object> params = new HashMap<String,Object>();
+        final boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
+        final ImageFormat imageFormat = Imaging.guessFormat(imageFile);
         if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF)
                 || imageFormat.equals(ImageFormat.IMAGE_FORMAT_JPEG)) {
             params.put(PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));
         }
 
-        ImageInfo imageInfoFile = Imaging.getImageInfo(imageFile, params);
+        final ImageInfo imageInfoFile = Imaging.getImageInfo(imageFile, params);
 
-        ImageInfo imageInfoBytes = Imaging.getImageInfo(imageFileBytes, params);
+        final ImageInfo imageInfoBytes = Imaging.getImageInfo(imageFileBytes, params);
 
         assertNotNull(imageInfoFile);
         assertNotNull(imageInfoBytes);
 
-        Method methods[] = ImageInfo.class.getMethods();
-        for (Method method2 : methods) {
-            Method method = method2;
+        final Method methods[] = ImageInfo.class.getMethods();
+        for (final Method method2 : methods) {
+            final Method method = method2;
             method.getModifiers();
             if (!Modifier.isPublic(method.getModifiers())) {
                 continue;
@@ -187,8 +187,8 @@ public class ByteSourceImageTest extends
             // continue;
             }
 
-            Object valueFile = method.invoke(imageInfoFile, (Object[])null);
-            Object valueBytes = method.invoke(imageInfoBytes, (Object[])null);
+            final Object valueFile = method.invoke(imageInfoFile, (Object[])null);
+            final Object valueBytes = method.invoke(imageInfoBytes, (Object[])null);
 
             assertTrue(valueFile.equals(valueBytes));
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java Tue Dec  4 17:23:16 2012
@@ -27,8 +27,8 @@ import java.io.OutputStream;
 import org.apache.commons.imaging.ImagingTest;
 
 public abstract class ByteSourceTest extends ImagingTest {
-    protected File createTempFile(byte src[]) throws IOException {
-        File file = createTempFile("raw_", ".bin");
+    protected File createTempFile(final byte src[]) throws IOException {
+        final File file = createTempFile("raw_", ".bin");
 
         // write test bytes to file.
         OutputStream os = new FileOutputStream(file);
@@ -43,29 +43,29 @@ public abstract class ByteSourceTest ext
     }
 
     protected byte[][] getTestByteArrays() {
-        byte emptyArray[] = (new byte[0]);
+        final byte emptyArray[] = (new byte[0]);
 
-        byte single[] = new byte[1];
+        final byte single[] = new byte[1];
         for (int i = 0; i < single.length; i++) {
             single[i] = (byte) i;
         }
 
-        byte simple[] = new byte[256];
+        final byte simple[] = new byte[256];
         for (int i = 0; i < simple.length; i++) {
             simple[i] = (byte) i;
         }
 
-        byte zeroes[] = new byte[256];
+        final byte zeroes[] = new byte[256];
         for (int i = 0; i < zeroes.length; i++) {
             zeroes[i] = 0;
         }
 
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         for (int i = 0; i < 256 * 256; i++) {
             baos.write(0xff & i);
             baos.write(0xff & (i >> 8));
         }
-        byte longArray[] = (baos.toByteArray());
+        final byte longArray[] = (baos.toByteArray());
 
         return new byte[][] { emptyArray, single, simple, zeroes, longArray, };
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java Tue Dec  4 17:23:16 2012
@@ -177,10 +177,10 @@ public class ApacheImagingSpeedAndMemory
      * @param args
      *            the path to the file to be processed
      */
-    public static void main(String[] args) {
-        String name = args[0];
+    public static void main(final String[] args) {
+        final String name = args[0];
 
-        ApacheImagingSpeedAndMemoryTest testStand = new ApacheImagingSpeedAndMemoryTest();
+        final ApacheImagingSpeedAndMemoryTest testStand = new ApacheImagingSpeedAndMemoryTest();
 
         testStand.performTest(name);
     }
@@ -192,9 +192,9 @@ public class ApacheImagingSpeedAndMemory
      * @param name
      *            the path for the input image file to be tested
      */
-    private void performTest(String name) {
-        File target = new File(name);
-        Formatter fmt = new Formatter(System.out);
+    private void performTest(final String name) {
+        final File target = new File(name);
+        final Formatter fmt = new Formatter(System.out);
 
         double sumTime = 0;
         int n = 1;
@@ -216,18 +216,18 @@ public class ApacheImagingSpeedAndMemory
                 TiffImageParser tiffImageParser = new TiffImageParser();
 
                 // load the file and record time needed to do so
-                long time0 = System.nanoTime();
+                final long time0 = System.nanoTime();
                 BufferedImage bImage = tiffImageParser.getBufferedImage(
                         byteSource, params);
-                long time1 = System.nanoTime();
+                final long time1 = System.nanoTime();
 
                 // tabulate results
-                double testTime = (time1 - time0) / 1000000.0;
+                final double testTime = (time1 - time0) / 1000000.0;
                 if (i > 1) {
                     n = i - 1;
                     sumTime += testTime;
                 }
-                double avgTime = sumTime / n;
+                final double avgTime = sumTime / n;
 
                 // tabulate the memory results. Note that the
                 // buffered image, the byte source, and the parser
@@ -236,10 +236,10 @@ public class ApacheImagingSpeedAndMemory
                 // may have already started collecting garbage,
                 // so there are limits to the reliability of these
                 // statistics
-                Runtime r = Runtime.getRuntime();
-                long freeMemory = r.freeMemory();
-                long totalMemory = r.totalMemory();
-                long usedMemory = totalMemory - freeMemory;
+                final Runtime r = Runtime.getRuntime();
+                final long freeMemory = r.freeMemory();
+                final long totalMemory = r.totalMemory();
+                final long usedMemory = totalMemory - freeMemory;
 
                 if (i == 0) {
                     // print header info
@@ -257,10 +257,10 @@ public class ApacheImagingSpeedAndMemory
                 byteSource = null;
                 params = null;
                 tiffImageParser = null;
-            } catch (ImageReadException ire) {
+            } catch (final ImageReadException ire) {
                 ire.printStackTrace();
                 System.exit(-1);
-            } catch (IOException ioex) {
+            } catch (final IOException ioex) {
                 ioex.printStackTrace();
                 System.exit(-1);
             }
@@ -273,7 +273,7 @@ public class ApacheImagingSpeedAndMemory
                 // suggesting that the code should be modified
                 Runtime.getRuntime().gc();
                 Thread.sleep(1000);
-            } catch (InterruptedException iex) {
+            } catch (final InterruptedException iex) {
                 // this isn't fatal, but shouldn't happen
                 iex.printStackTrace();
             }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java Tue Dec  4 17:23:16 2012
@@ -32,9 +32,9 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.common.IBufferedImageFactory;
 
 public class ImageReadExample {
-    public static BufferedImage imageReadExample(File file)
+    public static BufferedImage imageReadExample(final File file)
             throws ImageReadException, IOException {
-        Map<String,Object> params = new HashMap<String,Object>();
+        final Map<String,Object> params = new HashMap<String,Object>();
 
         // set optional parameters if you like
         params.put(ImagingConstants.BUFFERED_IMAGE_FACTORY,
@@ -43,7 +43,7 @@ public class ImageReadExample {
         // params.put(SanselanConstants.PARAM_KEY_VERBOSE, Boolean.TRUE);
 
         // read image
-        BufferedImage image = Imaging.getBufferedImage(file, params);
+        final BufferedImage image = Imaging.getBufferedImage(file, params);
 
         return image;
     }
@@ -51,18 +51,18 @@ public class ImageReadExample {
     public static class ManagedImageBufferedImageFactory implements
             IBufferedImageFactory {
 
-        public BufferedImage getColorBufferedImage(int width, int height,
-                boolean hasAlpha) {
-            GraphicsEnvironment ge = GraphicsEnvironment
+        public BufferedImage getColorBufferedImage(final int width, final int height,
+                final boolean hasAlpha) {
+            final GraphicsEnvironment ge = GraphicsEnvironment
                     .getLocalGraphicsEnvironment();
-            GraphicsDevice gd = ge.getDefaultScreenDevice();
-            GraphicsConfiguration gc = gd.getDefaultConfiguration();
+            final GraphicsDevice gd = ge.getDefaultScreenDevice();
+            final GraphicsConfiguration gc = gd.getDefaultConfiguration();
             return gc.createCompatibleImage(width, height,
                     Transparency.TRANSLUCENT);
         }
 
-        public BufferedImage getGrayscaleBufferedImage(int width, int height,
-                boolean hasAlpha) {
+        public BufferedImage getGrayscaleBufferedImage(final int width, final int height,
+                final boolean hasAlpha) {
             return getColorBufferedImage(width, height, hasAlpha);
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java Tue Dec  4 17:23:16 2012
@@ -30,19 +30,19 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.formats.tiff.constants.TiffConstants;
 
 public class ImageWriteExample {
-    public static byte[] imageWriteExample(File file)
+    public static byte[] imageWriteExample(final File file)
             throws ImageReadException, ImageWriteException, IOException {
         // read image
-        BufferedImage image = Imaging.getBufferedImage(file);
+        final BufferedImage image = Imaging.getBufferedImage(file);
 
-        ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
-        Map<String,Object> params = new HashMap<String,Object>();
+        final ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
+        final Map<String,Object> params = new HashMap<String,Object>();
 
         // set optional parameters if you like
         params.put(ImagingConstants.PARAM_KEY_COMPRESSION, new Integer(
                 TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED));
 
-        byte bytes[] = Imaging.writeImageToBytes(image, format, params);
+        final byte bytes[] = Imaging.writeImageToBytes(image, format, params);
 
         return bytes;
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java Tue Dec  4 17:23:16 2012
@@ -34,16 +34,16 @@ import org.apache.commons.imaging.format
 import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo;
 
 public class MetadataExample {
-    public static void metadataExample(File file) throws ImageReadException,
+    public static void metadataExample(final File file) throws ImageReadException,
             IOException {
         // get all metadata stored in EXIF format (ie. from JPEG or TIFF).
         // org.w3c.dom.Node node = Sanselan.getMetadataObsolete(imageBytes);
-        IImageMetadata metadata = Imaging.getMetadata(file);
+        final IImageMetadata metadata = Imaging.getMetadata(file);
 
         // System.out.println(metadata);
 
         if (metadata instanceof JpegImageMetadata) {
-            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+            final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
 
             // Jpeg EXIF metadata is stored in a TIFF-based directory structure
             // and is identified with TIFF tags.
@@ -77,13 +77,13 @@ public class MetadataExample {
             System.out.println();
 
             // simple interface to GPS data
-            TiffImageMetadata exifMetadata = jpegMetadata.getExif();
+            final TiffImageMetadata exifMetadata = jpegMetadata.getExif();
             if (null != exifMetadata) {
-                TiffImageMetadata.GPSInfo gpsInfo = exifMetadata.getGPS();
+                final TiffImageMetadata.GPSInfo gpsInfo = exifMetadata.getGPS();
                 if (null != gpsInfo) {
-                    String gpsDescription = gpsInfo.toString();
-                    double longitude = gpsInfo.getLongitudeAsDegreesEast();
-                    double latitude = gpsInfo.getLatitudeAsDegreesNorth();
+                    final String gpsDescription = gpsInfo.toString();
+                    final double longitude = gpsInfo.getLongitudeAsDegreesEast();
+                    final double latitude = gpsInfo.getLatitudeAsDegreesNorth();
 
                     System.out.println("    " + "GPS Description: "
                             + gpsDescription);
@@ -95,33 +95,33 @@ public class MetadataExample {
             }
 
             // more specific example of how to manually access GPS values
-            TiffField gpsLatitudeRefField = jpegMetadata
+            final TiffField gpsLatitudeRefField = jpegMetadata
                     .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF);
-            TiffField gpsLatitudeField = jpegMetadata
+            final TiffField gpsLatitudeField = jpegMetadata
                     .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE);
-            TiffField gpsLongitudeRefField = jpegMetadata
+            final TiffField gpsLongitudeRefField = jpegMetadata
                     .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF);
-            TiffField gpsLongitudeField = jpegMetadata
+            final TiffField gpsLongitudeField = jpegMetadata
                     .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE);
             if (gpsLatitudeRefField != null && gpsLatitudeField != null
                     && gpsLongitudeRefField != null
                     && gpsLongitudeField != null) {
                 // all of these values are strings.
-                String gpsLatitudeRef = (String) gpsLatitudeRefField.getValue();
-                RationalNumber gpsLatitude[] = (RationalNumber[]) (gpsLatitudeField
+                final String gpsLatitudeRef = (String) gpsLatitudeRefField.getValue();
+                final RationalNumber gpsLatitude[] = (RationalNumber[]) (gpsLatitudeField
                         .getValue());
-                String gpsLongitudeRef = (String) gpsLongitudeRefField
+                final String gpsLongitudeRef = (String) gpsLongitudeRefField
                         .getValue();
-                RationalNumber gpsLongitude[] = (RationalNumber[]) gpsLongitudeField
+                final RationalNumber gpsLongitude[] = (RationalNumber[]) gpsLongitudeField
                         .getValue();
 
-                RationalNumber gpsLatitudeDegrees = gpsLatitude[0];
-                RationalNumber gpsLatitudeMinutes = gpsLatitude[1];
-                RationalNumber gpsLatitudeSeconds = gpsLatitude[2];
-
-                RationalNumber gpsLongitudeDegrees = gpsLongitude[0];
-                RationalNumber gpsLongitudeMinutes = gpsLongitude[1];
-                RationalNumber gpsLongitudeSeconds = gpsLongitude[2];
+                final RationalNumber gpsLatitudeDegrees = gpsLatitude[0];
+                final RationalNumber gpsLatitudeMinutes = gpsLatitude[1];
+                final RationalNumber gpsLatitudeSeconds = gpsLatitude[2];
+
+                final RationalNumber gpsLongitudeDegrees = gpsLongitude[0];
+                final RationalNumber gpsLongitudeMinutes = gpsLongitude[1];
+                final RationalNumber gpsLongitudeSeconds = gpsLongitude[2];
 
                 // This will format the gps info like so:
                 //
@@ -143,9 +143,9 @@ public class MetadataExample {
 
             System.out.println();
 
-            List<IImageMetadataItem> items = jpegMetadata.getItems();
+            final List<IImageMetadataItem> items = jpegMetadata.getItems();
             for (int i = 0; i < items.size(); i++) {
-                IImageMetadataItem item = items.get(i);
+                final IImageMetadataItem item = items.get(i);
                 System.out.println("    " + "item: " + item);
             }
 
@@ -153,9 +153,9 @@ public class MetadataExample {
         }
     }
 
-    private static void printTagValue(JpegImageMetadata jpegMetadata,
-            TagInfo tagInfo) {
-        TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
+    private static void printTagValue(final JpegImageMetadata jpegMetadata,
+            final TagInfo tagInfo) {
+        final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
         if (field == null) {
             System.out.println(tagInfo.name + ": " + "Not Found.");
         } else {

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java Tue Dec  4 17:23:16 2012
@@ -40,48 +40,48 @@ public class SampleUsage {
             // initialized.
             // Sanselan works equally well with File, byte array or InputStream
             // inputs.</b>
-            BufferedImage someImage = null;
-            byte someBytes[] = null;
-            File someFile = null;
-            InputStream someInputStream = null;
-            OutputStream someOutputStream = null;
+            final BufferedImage someImage = null;
+            final byte someBytes[] = null;
+            final File someFile = null;
+            final InputStream someInputStream = null;
+            final OutputStream someOutputStream = null;
 
             // <b>The Sanselan class provides a simple interface to the library.
             // </b>
 
             // <b>how to read an image: </b>
-            byte imageBytes[] = someBytes;
-            BufferedImage image_1 = Imaging.getBufferedImage(imageBytes);
+            final byte imageBytes[] = someBytes;
+            final BufferedImage image_1 = Imaging.getBufferedImage(imageBytes);
 
             // <b>methods of Sanselan usually accept files, byte arrays, or
             // inputstreams as arguments. </b>
-            BufferedImage image_2 = Imaging.getBufferedImage(imageBytes);
-            File file = someFile;
-            BufferedImage image_3 = Imaging.getBufferedImage(file);
-            InputStream is = someInputStream;
-            BufferedImage image_4 = Imaging.getBufferedImage(is);
+            final BufferedImage image_2 = Imaging.getBufferedImage(imageBytes);
+            final File file = someFile;
+            final BufferedImage image_3 = Imaging.getBufferedImage(file);
+            final InputStream is = someInputStream;
+            final BufferedImage image_4 = Imaging.getBufferedImage(is);
 
             // <b>Write an image. </b>
-            BufferedImage image = someImage;
-            File dst = someFile;
-            ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG;
-            Map<String,Object> optional_params = new HashMap<String,Object>();
+            final BufferedImage image = someImage;
+            final File dst = someFile;
+            final ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG;
+            final Map<String,Object> optional_params = new HashMap<String,Object>();
             Imaging.writeImage(image, dst, format, optional_params);
 
-            OutputStream os = someOutputStream;
+            final OutputStream os = someOutputStream;
             Imaging.writeImage(image, os, format, optional_params);
 
             // <b>get the image's embedded ICC Profile, if it has one. </b>
-            byte iccProfileBytes[] = Imaging.getICCProfileBytes(imageBytes);
+            final byte iccProfileBytes[] = Imaging.getICCProfileBytes(imageBytes);
 
-            ICC_Profile iccProfile = Imaging.getICCProfile(imageBytes);
+            final ICC_Profile iccProfile = Imaging.getICCProfile(imageBytes);
 
             // <b>get the image's width and height. </b>
-            Dimension d = Imaging.getImageSize(imageBytes);
+            final Dimension d = Imaging.getImageSize(imageBytes);
 
             // <b>get all of the image's info (ie. bits per pixel, size,
             // transparency, etc.) </b>
-            ImageInfo imageInfo = Imaging.getImageInfo(imageBytes);
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageBytes);
 
             if (imageInfo.getColorType() == ImageInfo.COLOR_TYPE_GRAYSCALE) {
                 System.out.println("Grayscale image.");
@@ -91,23 +91,23 @@ public class SampleUsage {
             }
 
             // <b>try to guess the image's format. </b>
-            ImageFormat image_format = Imaging.guessFormat(imageBytes);
+            final ImageFormat image_format = Imaging.guessFormat(imageBytes);
             image_format.equals(ImageFormat.IMAGE_FORMAT_PNG);
 
             // <b>get all metadata stored in EXIF format (ie. from JPEG or
             // TIFF). </b>
             // <b>org.w3c.dom.Node node =
             // Sanselan.getMetadataObsolete(imageBytes); </b>
-            IImageMetadata metadata = Imaging.getMetadata(imageBytes);
+            final IImageMetadata metadata = Imaging.getMetadata(imageBytes);
 
             // <b>print a dump of information about an image to stdout. </b>
             Imaging.dumpImageFile(imageBytes);
 
             // <b>get a summary of format errors. </b>
-            FormatCompliance formatCompliance = Imaging
+            final FormatCompliance formatCompliance = Imaging
                     .getFormatCompliance(imageBytes);
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
 
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java Tue Dec  4 17:23:16 2012
@@ -36,7 +36,7 @@ import org.apache.commons.imaging.format
 import org.apache.commons.imaging.util.IoUtils;
 
 public class WriteExifMetadataExample {
-    public void removeExifMetadata(File jpegImageFile, File dst)
+    public void removeExifMetadata(final File jpegImageFile, final File dst)
             throws IOException, ImageReadException, ImageWriteException {
         OutputStream os = null;
         try {
@@ -48,7 +48,7 @@ public class WriteExifMetadataExample {
             if (os != null) {
                 try {
                     os.close();
-                } catch (IOException e) {
+                } catch (final IOException e) {
 
                 }
             }
@@ -66,18 +66,18 @@ public class WriteExifMetadataExample {
      * @throws ImageReadException
      * @throws ImageWriteException
      */
-    public void changeExifMetadata(File jpegImageFile, File dst)
+    public void changeExifMetadata(final File jpegImageFile, final File dst)
             throws IOException, ImageReadException, ImageWriteException {
         OutputStream os = null;
         try {
             TiffOutputSet outputSet = null;
 
             // note that metadata might be null if no metadata is found.
-            IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
-            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+            final IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
+            final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
             if (null != jpegMetadata) {
                 // note that exif might be null if no Exif metadata is found.
-                TiffImageMetadata exif = jpegMetadata.getExif();
+                final TiffImageMetadata exif = jpegMetadata.getExif();
 
                 if (null != exif) {
                     // TiffImageMetadata class is immutable (read-only).
@@ -116,7 +116,7 @@ public class WriteExifMetadataExample {
                 // see
                 // org.apache.commons.sanselan.formats.tiff.constants.AllTagConstants
                 //
-                TiffOutputDirectory exifDirectory = outputSet
+                final TiffOutputDirectory exifDirectory = outputSet
                         .getOrCreateExifDirectory();
                 // make sure to remove old value if present (this method will
                 // not fail if the tag does not exist).
@@ -130,8 +130,8 @@ public class WriteExifMetadataExample {
                 // Example of how to add/update GPS info to output set.
 
                 // New York City
-                double longitude = -74.0; // 74 degrees W (in Degrees East)
-                double latitude = 40 + 43 / 60.0; // 40 degrees N (in Degrees
+                final double longitude = -74.0; // 74 degrees W (in Degrees East)
+                final double latitude = 40 + 43 / 60.0; // 40 degrees N (in Degrees
                 // North)
 
                 outputSet.setGPSInDegrees(longitude, latitude);
@@ -151,7 +151,7 @@ public class WriteExifMetadataExample {
             if (os != null) {
                 try {
                     os.close();
-                } catch (IOException e) {
+                } catch (final IOException e) {
 
                 }
             }
@@ -173,18 +173,18 @@ public class WriteExifMetadataExample {
      * @throws ImageReadException
      * @throws ImageWriteException
      */
-    public void removeExifTag(File jpegImageFile, File dst) throws IOException,
+    public void removeExifTag(final File jpegImageFile, final File dst) throws IOException,
             ImageReadException, ImageWriteException {
         OutputStream os = null;
         try {
             TiffOutputSet outputSet = null;
 
             // note that metadata might be null if no metadata is found.
-            IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
-            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+            final IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
+            final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
             if (null != jpegMetadata) {
                 // note that exif might be null if no Exif metadata is found.
-                TiffImageMetadata exif = jpegMetadata.getExif();
+                final TiffImageMetadata exif = jpegMetadata.getExif();
 
                 if (null != exif) {
                     // TiffImageMetadata class is immutable (read-only).
@@ -224,7 +224,7 @@ public class WriteExifMetadataExample {
                 // To learn which directory a tag appears in, either refer to
                 // the constants in ExifTagConstants.java or go to Phil Harvey's
                 // EXIF website.
-                TiffOutputDirectory exifDirectory = outputSet
+                final TiffOutputDirectory exifDirectory = outputSet
                         .getExifDirectory();
                 if (null != exifDirectory) {
                     exifDirectory
@@ -244,7 +244,7 @@ public class WriteExifMetadataExample {
             if (os != null) {
                 try {
                     os.close();
-                } catch (IOException e) {
+                } catch (final IOException e) {
 
                 }
             }
@@ -262,18 +262,18 @@ public class WriteExifMetadataExample {
      * @throws ImageReadException
      * @throws ImageWriteException
      */
-    public void setExifGPSTag(File jpegImageFile, File dst) throws IOException,
+    public void setExifGPSTag(final File jpegImageFile, final File dst) throws IOException,
             ImageReadException, ImageWriteException {
         OutputStream os = null;
         try {
             TiffOutputSet outputSet = null;
 
             // note that metadata might be null if no metadata is found.
-            IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
-            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+            final IImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
+            final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
             if (null != jpegMetadata) {
                 // note that exif might be null if no Exif metadata is found.
-                TiffImageMetadata exif = jpegMetadata.getExif();
+                final TiffImageMetadata exif = jpegMetadata.getExif();
 
                 if (null != exif) {
                     // TiffImageMetadata class is immutable (read-only).
@@ -299,8 +299,8 @@ public class WriteExifMetadataExample {
                 // Example of how to add/update GPS info to output set.
 
                 // New York City
-                double longitude = -74.0; // 74 degrees W (in Degrees East)
-                double latitude = 40 + 43 / 60.0; // 40 degrees N (in Degrees
+                final double longitude = -74.0; // 74 degrees W (in Degrees East)
+                final double latitude = 40 + 43 / 60.0; // 40 degrees N (in Degrees
                 // North)
 
                 outputSet.setGPSInDegrees(longitude, latitude);
@@ -318,7 +318,7 @@ public class WriteExifMetadataExample {
             if (os != null) {
                 try {
                     os.close();
-                } catch (IOException e) {
+                } catch (final IOException e) {
 
                 }
             }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java Tue Dec  4 17:23:16 2012
@@ -28,14 +28,14 @@ import org.apache.commons.imaging.Imagin
 
 public abstract class BmpBaseTest extends ImagingTest {
 
-    private static boolean isBmp(File file) throws IOException,
+    private static boolean isBmp(final File file) throws IOException,
             ImageReadException {
-        ImageFormat format = Imaging.guessFormat(file);
+        final ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_BMP;
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException {
+        public boolean accept(final File file) throws IOException, ImageReadException {
             return isBmp(file);
         }
     };

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java Tue Dec  4 17:23:16 2012
@@ -33,24 +33,24 @@ public class BmpReadTest extends BmpBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List<File> images = getBmpImages();
+        final List<File> images = getBmpImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = images.get(i);
+            final File imageFile = images.get(i);
             Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata(imageFile);
+            final IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map<String,Object> params = new HashMap<String,Object>();
+            final Map<String,Object> params = new HashMap<String,Object>();
             // params.put(PARAM_KEY_VERBOSE, Boolean.TRUE);
-            ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java Tue Dec  4 17:23:16 2012
@@ -33,8 +33,8 @@ import org.apache.commons.imaging.util.I
 
 public class BmpRoundtripTest extends BmpBaseTest {
 
-    private int[][] getSimpleRawData(int width, int height, int value) {
-        int[][] result = new int[height][width];
+    private int[][] getSimpleRawData(final int width, final int height, final int value) {
+        final int[][] result = new int[height][width];
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {
                 result[y][x] = value;
@@ -43,13 +43,13 @@ public class BmpRoundtripTest extends Bm
         return result;
     }
 
-    private int[][] getAscendingRawData(int width, int height) {
-        int[][] result = new int[height][width];
+    private int[][] getAscendingRawData(final int width, final int height) {
+        final int[][] result = new int[height][width];
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {
-                int alpha = (x + y) % 256;
-                int value = (x + y) % 256;
-                int argb = (0xff & alpha) << 24 | (0xff & value) << 16
+                final int alpha = (x + y) % 256;
+                final int value = (x + y) % 256;
+                final int argb = (0xff & alpha) << 24 | (0xff & value) << 16
                         | (0xff & value) << 8 | (0xff & value) << 0;
 
                 result[y][x] = argb;
@@ -58,12 +58,12 @@ public class BmpRoundtripTest extends Bm
         return result;
     }
 
-    private int[][] randomRawData(int width, int height) {
-        Random random = new Random();
-        int[][] result = new int[height][width];
+    private int[][] randomRawData(final int width, final int height) {
+        final Random random = new Random();
+        final int[][] result = new int[height][width];
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {
-                int argb = random.nextInt();
+                final int argb = random.nextInt();
                 result[y][x] = argb;
             }
         }
@@ -71,39 +71,39 @@ public class BmpRoundtripTest extends Bm
     }
 
     public void testSmallBlackPixels() throws Exception {
-        int[][] smallBlackPixels = getSimpleRawData(256, 256, 0);
+        final int[][] smallBlackPixels = getSimpleRawData(256, 256, 0);
         writeAndReadImageData(smallBlackPixels);
     }
 
     public void testSingleBlackPixel() throws Exception {
-        int[][] singleBlackPixel = getSimpleRawData(1, 1, 0);
+        final int[][] singleBlackPixel = getSimpleRawData(1, 1, 0);
         writeAndReadImageData(singleBlackPixel);
     }
 
     public void testSmallRedPixels() throws Exception {
-        int[][] smallRedPixels = getSimpleRawData(256, 256, 0xffff0000);
+        final int[][] smallRedPixels = getSimpleRawData(256, 256, 0xffff0000);
         writeAndReadImageData(smallRedPixels);
     }
 
     public void testSingleRedPixel() throws Exception {
-        int[][] singleRedPixel = getSimpleRawData(1, 1, 0xffff0000);
+        final int[][] singleRedPixel = getSimpleRawData(1, 1, 0xffff0000);
         writeAndReadImageData(singleRedPixel);
     }
 
     public void testSmallAscendingPixels() throws Exception {
-        int[][] smallAscendingPixels = getAscendingRawData(256, 256);
+        final int[][] smallAscendingPixels = getAscendingRawData(256, 256);
         writeAndReadImageData(smallAscendingPixels);
     }
 
     public void testSmallRandomPixels() throws Exception {
-        int[][] smallRandomPixels = randomRawData(256, 256);
+        final int[][] smallRandomPixels = randomRawData(256, 256);
         writeAndReadImageData(smallRandomPixels);
     }
 
-    private BufferedImage imageDataToBufferedImage(int[][] rawData) {
-        int width = rawData[0].length;
-        int height = rawData.length;
-        BufferedImage image = new BufferedImage(width, height,
+    private BufferedImage imageDataToBufferedImage(final int[][] rawData) {
+        final int width = rawData[0].length;
+        final int height = rawData.length;
+        final BufferedImage image = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {
@@ -113,10 +113,10 @@ public class BmpRoundtripTest extends Bm
         return image;
     }
 
-    private int[][] bufferedImageToImageData(BufferedImage image) {
-        int width = image.getWidth();
-        int height = image.getHeight();
-        int[][] result = new int[height][width];
+    private int[][] bufferedImageToImageData(final BufferedImage image) {
+        final int width = image.getWidth();
+        final int height = image.getHeight();
+        final int[][] result = new int[height][width];
 
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {
@@ -126,35 +126,35 @@ public class BmpRoundtripTest extends Bm
         return result;
     }
 
-    private void writeAndReadImageData(int[][] rawData) throws IOException,
+    private void writeAndReadImageData(final int[][] rawData) throws IOException,
             ImageReadException, ImageWriteException {
-        BufferedImage srcImage = imageDataToBufferedImage(rawData);
+        final BufferedImage srcImage = imageDataToBufferedImage(rawData);
 
-        Map<String,Object> writeParams = new HashMap<String,Object>();
+        final Map<String,Object> writeParams = new HashMap<String,Object>();
         // writeParams.put(SanselanConstants.PARAM_KEY_FORMAT,
         // ImageFormat.IMAGE_FORMAT_BMP);
         // writeParams.put(PngConstants.PARAM_KEY_BMP_FORCE_TRUE_COLOR,
         // Boolean.TRUE);
 
-        byte bytes[] = Imaging.writeImageToBytes(srcImage,
+        final byte bytes[] = Imaging.writeImageToBytes(srcImage,
                 ImageFormat.IMAGE_FORMAT_BMP, writeParams);
 
         // Debug.debug("bytes", bytes);
 
-        File tempFile = createTempFile("temp", ".bmp");
+        final File tempFile = createTempFile("temp", ".bmp");
         IoUtils.writeToFile(bytes, tempFile);
 
-        BufferedImage dstImage = Imaging.getBufferedImage(bytes);
+        final BufferedImage dstImage = Imaging.getBufferedImage(bytes);
 
         assertNotNull(dstImage);
         assertTrue(srcImage.getWidth() == dstImage.getWidth());
         assertTrue(srcImage.getHeight() == dstImage.getHeight());
 
-        int dstData[][] = bufferedImageToImageData(dstImage);
+        final int dstData[][] = bufferedImageToImageData(dstImage);
         compare(rawData, dstData);
     }
 
-    private void compare(int[][] a, int[][] b) {
+    private void compare(final int[][] a, final int[][] b) {
         assertNotNull(a);
         assertNotNull(b);
         assertTrue(a.length == b.length);
@@ -165,8 +165,8 @@ public class BmpRoundtripTest extends Bm
             assertTrue(a[0].length == b[y].length);
             for (int x = 0; x < a[y].length; x++) {
                 // ignore alpha channel - BMP has no transparency.
-                int rgbA = 0xffffff & a[y][x];
-                int rgbB = 0xffffff & b[y][x];
+                final int rgbA = 0xffffff & a[y][x];
+                final int rgbB = 0xffffff & b[y][x];
 
                 if (rgbA != rgbB) {
                     Debug.debug("x: " + x + ", y: " + y + ", rgbA: " + rgbA

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java Tue Dec  4 17:23:16 2012
@@ -28,14 +28,14 @@ import org.apache.commons.imaging.Imagin
 
 public abstract class DcxBaseTest extends ImagingTest {
 
-    private static boolean isDcx(File file) throws IOException,
+    private static boolean isDcx(final File file) throws IOException,
             ImageReadException {
-        ImageFormat format = Imaging.guessFormat(file);
+        final ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_DCX;
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException {
+        public boolean accept(final File file) throws IOException, ImageReadException {
             return isDcx(file);
         }
     };

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java Tue Dec  4 17:23:16 2012
@@ -33,23 +33,23 @@ public class DcxReadTest extends DcxBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List<File> images = getDcxImages();
+        final List<File> images = getDcxImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = images.get(i);
+            final File imageFile = images.get(i);
             Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata(imageFile);
+            final IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map<String,Object> params = new HashMap<String,Object>();
-            ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
+            final Map<String,Object> params = new HashMap<String,Object>();
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             // assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java Tue Dec  4 17:23:16 2012
@@ -28,14 +28,14 @@ import org.apache.commons.imaging.Imagin
 
 public abstract class GifBaseTest extends ImagingTest {
 
-    private static boolean isGif(File file) throws IOException,
+    private static boolean isGif(final File file) throws IOException,
             ImageReadException {
-        ImageFormat format = Imaging.guessFormat(file);
+        final ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_GIF;
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException {
+        public boolean accept(final File file) throws IOException, ImageReadException {
             return isGif(file);
         }
     };

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java Tue Dec  4 17:23:16 2012
@@ -31,22 +31,22 @@ public class GifReadTest extends GifBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List<File> images = getGifImages();
+        final List<File> images = getGifImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = images.get(i);
+            final File imageFile = images.get(i);
             Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata(imageFile);
+            final IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            ImageInfo imageInfo = Imaging.getImageInfo(imageFile);
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageFile);
             assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java Tue Dec  4 17:23:16 2012
@@ -28,14 +28,14 @@ import org.apache.commons.imaging.Imagin
 
 public abstract class IcnsBaseTest extends ImagingTest {
 
-    private static boolean isIcns(File file) throws IOException,
+    private static boolean isIcns(final File file) throws IOException,
             ImageReadException {
-        ImageFormat format = Imaging.guessFormat(file);
+        final ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_ICNS;
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException {
+        public boolean accept(final File file) throws IOException, ImageReadException {
             return isIcns(file);
         }
     };

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java Tue Dec  4 17:23:16 2012
@@ -33,23 +33,23 @@ public class IcnsReadTest extends IcnsBa
     public void test() throws Exception {
         Debug.debug("start");
 
-        List<File> images = getIcnsImages();
+        final List<File> images = getIcnsImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = images.get(i);
+            final File imageFile = images.get(i);
             Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata(imageFile);
+            final IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map<String,Object> params = new HashMap<String,Object>();
-            ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
+            final Map<String,Object> params = new HashMap<String,Object>();
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);
         }
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java Tue Dec  4 17:23:16 2012
@@ -53,8 +53,8 @@ public class IcnsRoundTripTest extends I
     public void test1BPPIconMaskVersus8BPPMask() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0xff000000;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 2 * 16 * 16 / 8 + 4 + 4 + 16 * 16);
@@ -90,8 +90,8 @@ public class IcnsRoundTripTest extends I
     public void test8BPPIcon8BPPMask() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0x00cccccc;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 16 * 16 + 4 + 4 + 16 * 16);
@@ -127,8 +127,8 @@ public class IcnsRoundTripTest extends I
     public void test8BPPIcon8BPPMaskVersus1BPPMask() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0x00cccccc;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 16 * 16 + 4 + 4 + 16 * 16 + 4 + 4 + 2
@@ -185,8 +185,8 @@ public class IcnsRoundTripTest extends I
     public void test8BPPIcon1BPPMaskVersus8BPPMask() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0x00cccccc;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 16 * 16 + 4 + 4 + 16 * 16 + 4 + 4 + 2
@@ -243,8 +243,8 @@ public class IcnsRoundTripTest extends I
     public void test8BPPIconNoMask() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0xffcccccc;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 16 * 16);
@@ -268,8 +268,8 @@ public class IcnsRoundTripTest extends I
     public void test32BPPMaskedIcon() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0x000000ff;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 4 * 16 * 16 + 4 + 4 + 2 * 16 * 16 / 8);
@@ -324,8 +324,8 @@ public class IcnsRoundTripTest extends I
     public void test32BPPHalfMaskedIcon() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0xff0000ff;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 4 * 16 * 16 + 4 + 4 + 16 * 16 / 8);
@@ -367,7 +367,7 @@ public class IcnsRoundTripTest extends I
         try {
             writeAndReadImageData("32bpp-half-masked-CORRUPT",
                     baos.toByteArray(), foreground, background);
-        } catch (ImageReadException imageReadException) {
+        } catch (final ImageReadException imageReadException) {
             threw = true;
         }
         assertTrue("ICNS file with corrupt mask didn't fail to parse", threw);
@@ -376,8 +376,8 @@ public class IcnsRoundTripTest extends I
     public void test32BPPMaskMissingIcon() throws Exception {
         final int foreground = 0xff000000;
         final int background = 0xff0000ff;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        BinaryOutputStream bos = new BinaryOutputStream(baos,
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final BinaryOutputStream bos = new BinaryOutputStream(baos,
                 ByteOrder.BIG_ENDIAN);
         bos.write4Bytes(IcnsImageParser.ICNS_MAGIC);
         bos.write4Bytes(4 + 4 + 4 + 4 + 4 * 16 * 16);
@@ -403,17 +403,17 @@ public class IcnsRoundTripTest extends I
                 foreground, background);
     }
 
-    private void writeAndReadImageData(String description, byte[] rawData,
-            int foreground, int background) throws IOException,
+    private void writeAndReadImageData(final String description, final byte[] rawData,
+            final int foreground, final int background) throws IOException,
             ImageReadException {
         // Uncomment to generate ICNS files that can be tested with MacOS:
-        File exportFile = new File("/tmp/" + description + ".icns");
+        final File exportFile = new File("/tmp/" + description + ".icns");
         IoUtils.writeToFile(rawData, exportFile);
 
-        File tempFile = createTempFile("temp", ".icns");
+        final File tempFile = createTempFile("temp", ".icns");
         IoUtils.writeToFile(rawData, tempFile);
 
-        BufferedImage dstImage = Imaging.getBufferedImage(tempFile);
+        final BufferedImage dstImage = Imaging.getBufferedImage(tempFile);
 
         assertNotNull(dstImage);
         assertTrue(dstImage.getWidth() == image[0].length);
@@ -422,15 +422,15 @@ public class IcnsRoundTripTest extends I
         verify(dstImage, foreground, background);
     }
 
-    private void verify(BufferedImage data, int foreground, int background) {
+    private void verify(final BufferedImage data, final int foreground, final int background) {
         assertNotNull(data);
         assertTrue(data.getHeight() == image.length);
 
         for (int y = 0; y < data.getHeight(); y++) {
             assertTrue(data.getWidth() == image[y].length);
             for (int x = 0; x < data.getWidth(); x++) {
-                int imageARGB = (image[y][x] == 1) ? foreground : background;
-                int dataARGB = data.getRGB(x, y);
+                final int imageARGB = (image[y][x] == 1) ? foreground : background;
+                final int dataARGB = data.getRGB(x, y);
 
                 if (imageARGB != dataARGB) {
                     Debug.debug("x: " + x + ", y: " + y + ", image: "

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java Tue Dec  4 17:23:16 2012
@@ -26,13 +26,13 @@ import org.apache.commons.imaging.Imagin
 
 public abstract class IcoBaseTest extends ImagingTest {
 
-    private static boolean isIco(File file) {
+    private static boolean isIco(final File file) {
         return file.getName().toLowerCase().endsWith(".ico")
                 || file.getName().toLowerCase().endsWith(".cur");
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException {
+        public boolean accept(final File file) throws IOException, ImageReadException {
             return isIco(file);
         }
     };

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java Tue Dec  4 17:23:16 2012
@@ -33,23 +33,23 @@ public class IcoReadTest extends IcoBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List<File> images = getIcoImages();
+        final List<File> images = getIcoImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = images.get(i);
+            final File imageFile = images.get(i);
             Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata(imageFile);
+            final IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map<String,Object> params = new HashMap<String,Object>();
-            ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
+            final Map<String,Object> params = new HashMap<String,Object>();
+            final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             // assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);
         }
     }



Mime
View raw message