commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1417043 [2/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/ m...
Date Tue, 04 Dec 2012 17:24:32 GMT
Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java Tue Dec  4 17:23:16 2012
@@ -95,7 +95,7 @@ public abstract class Imaging implements
      * @return true if the file-name includes a supported image 
      * format file extension; otherwise, false.
      */
-    public static boolean hasImageFileExtension(File file) {
+    public static boolean hasImageFileExtension(final File file) {
         if (file==null || !file.isFile()) {
             return false;
         }
@@ -118,11 +118,11 @@ public abstract class Imaging implements
         
         filename = filename.toLowerCase();
 
-        ImageParser imageParsers[] = ImageParser.getAllImageParsers();
-        for (ImageParser imageParser : imageParsers) {
-            String exts[] = imageParser.getAcceptedExtensions();
+        final ImageParser imageParsers[] = ImageParser.getAllImageParsers();
+        for (final ImageParser imageParser : imageParsers) {
+            final String exts[] = imageParser.getAcceptedExtensions();
 
-            for (String ext : exts) {
+            for (final String ext : exts) {
                 if (filename.endsWith(ext.toLowerCase())) {
                     return true;
                 }
@@ -147,7 +147,7 @@ public abstract class Imaging implements
      *         ImageFormat.IMAGE_FORMAT_UNKNOWN if the image type cannot be
      *         determined.
      */
-    public static ImageFormat guessFormat(byte bytes[])
+    public static ImageFormat guessFormat(final byte bytes[])
             throws ImageReadException, IOException {
         return guessFormat(new ByteSourceArray(bytes));
     }
@@ -167,7 +167,7 @@ public abstract class Imaging implements
      *         ImageFormat.IMAGE_FORMAT_UNKNOWN if the image type cannot be
      *         determined.
      */
-    public static ImageFormat guessFormat(File file) throws ImageReadException,
+    public static ImageFormat guessFormat(final File file) throws ImageReadException,
             IOException {
         return guessFormat(new ByteSourceFile(file));
     }
@@ -192,7 +192,7 @@ public abstract class Imaging implements
     private static final int[] MAGIC_NUMBERS_DCX = { 0xB1, 0x68, };
     private static final int[] MAGIC_NUMBERS_RGBE = { 0x23, 0x3F, };
 
-    private static boolean compareBytePair(int[] a, int b[]) {
+    private static boolean compareBytePair(final int[] a, final int b[]) {
         if (a.length != 2 && b.length != 2) {
             throw new RuntimeException("Invalid Byte Pair.");
         }
@@ -219,7 +219,7 @@ public abstract class Imaging implements
      * attempt to read the image data
      * @throws IOException in the event of an unrecoverable I/O condition.
      */
-    public static ImageFormat guessFormat(ByteSource byteSource)
+    public static ImageFormat guessFormat(final ByteSource byteSource)
             throws ImageReadException, IOException {
         
         if (byteSource==null) {
@@ -231,16 +231,16 @@ public abstract class Imaging implements
         try {
             is = byteSource.getInputStream();
 
-            int i1 = is.read();
-            int i2 = is.read();
+            final int i1 = is.read();
+            final int i2 = is.read();
             if ((i1 < 0) || (i2 < 0)) {
                 throw new ImageReadException(
                         "Couldn't read magic numbers to guess format.");
             }
 
-            int b1 = i1 & 0xff;
-            int b2 = i2 & 0xff;
-            int bytePair[] = { b1, b2, };
+            final int b1 = i1 & 0xff;
+            final int b2 = i2 & 0xff;
+            final int bytePair[] = { b1, b2, };
 
             if (compareBytePair(MAGIC_NUMBERS_GIF, bytePair)) {
                 return ImageFormat.IMAGE_FORMAT_GIF;
@@ -276,16 +276,16 @@ public abstract class Imaging implements
             } else if (compareBytePair(MAGIC_NUMBERS_PPM_B, bytePair)) {
                 return ImageFormat.IMAGE_FORMAT_PPM;
             } else if (compareBytePair(MAGIC_NUMBERS_JBIG2_1, bytePair)) {
-                int i3 = is.read();
-                int i4 = is.read();
+                final int i3 = is.read();
+                final int i4 = is.read();
                 if ((i3 < 0) || (i4 < 0)) {
                     throw new ImageReadException(
                             "Couldn't read magic numbers to guess format.");
                 }
 
-                int b3 = i3 & 0xff;
-                int b4 = i4 & 0xff;
-                int bytePair2[] = { b3, b4, };
+                final int b3 = i3 & 0xff;
+                final int b4 = i4 & 0xff;
+                final int bytePair2[] = { b3, b4, };
                 if (compareBytePair(MAGIC_NUMBERS_JBIG2_2, bytePair2)) {
                     return ImageFormat.IMAGE_FORMAT_JBIG2;
                 }
@@ -303,7 +303,7 @@ public abstract class Imaging implements
                 try {
                     is.close();
 
-                } catch (IOException e) {
+                } catch (final IOException e) {
                     Debug.debug(e);
 
                 }
@@ -321,7 +321,7 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile.
      */
-    public static ICC_Profile getICCProfile(byte bytes[])
+    public static ICC_Profile getICCProfile(final byte bytes[])
             throws ImageReadException, IOException {
         return getICCProfile(bytes, null);
     }
@@ -338,7 +338,7 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(byte bytes[], Map<String,Object> params)
+    public static ICC_Profile getICCProfile(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceArray(bytes), params);
     }
@@ -355,7 +355,7 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(InputStream is, String filename)
+    public static ICC_Profile getICCProfile(final InputStream is, final String filename)
             throws ImageReadException, IOException {
         return getICCProfile(is, filename, null);
     }
@@ -374,8 +374,8 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(InputStream is, String filename,
-            Map<String,Object> params) throws ImageReadException, IOException {
+    public static ICC_Profile getICCProfile(final InputStream is, final String filename,
+            final Map<String,Object> params) throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -389,7 +389,7 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(File file)
+    public static ICC_Profile getICCProfile(final File file)
             throws ImageReadException, IOException {
         return getICCProfile(file, null);
     }
@@ -406,20 +406,20 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(File file, Map<String,Object> params)
+    public static ICC_Profile getICCProfile(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceFile(file), params);
     }
 
-    protected static ICC_Profile getICCProfile(ByteSource byteSource, Map<String,Object> params)
+    protected static ICC_Profile getICCProfile(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        byte bytes[] = getICCProfileBytes(byteSource, params);
+        final byte bytes[] = getICCProfileBytes(byteSource, params);
         if (bytes == null) {
             return null;
         }
 
-        IccProfileParser parser = new IccProfileParser();
-        IccProfileInfo info = parser.getICCProfileInfo(bytes);
+        final IccProfileParser parser = new IccProfileParser();
+        final IccProfileInfo info = parser.getICCProfileInfo(bytes);
         if (info == null) {
             return null;
         }
@@ -427,7 +427,7 @@ public abstract class Imaging implements
             return null;
         }
 
-        ICC_Profile icc = ICC_Profile.getInstance(bytes);
+        final ICC_Profile icc = ICC_Profile.getInstance(bytes);
         return icc;
     }
 
@@ -445,7 +445,7 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(byte bytes[])
+    public static byte[] getICCProfileBytes(final byte bytes[])
             throws ImageReadException, IOException {
         return getICCProfileBytes(bytes, null);
     }
@@ -466,7 +466,7 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(byte bytes[], Map<String,Object> params)
+    public static byte[] getICCProfileBytes(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfileBytes(new ByteSourceArray(bytes), params);
     }
@@ -485,7 +485,7 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(File file)
+    public static byte[] getICCProfileBytes(final File file)
             throws ImageReadException, IOException {
         return getICCProfileBytes(file, null);
     }
@@ -506,14 +506,14 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(File file, Map<String,Object> params)
+    public static byte[] getICCProfileBytes(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfileBytes(new ByteSourceFile(file), params);
     }
 
-    private static byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
+    private static byte[] getICCProfileBytes(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getICCProfileBytes(byteSource, params);
     }
@@ -536,8 +536,8 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(String filename, byte bytes[],
-            Map<String,Object> params) throws ImageReadException, IOException {
+    public static ImageInfo getImageInfo(final String filename, final byte bytes[],
+            final Map<String,Object> params) throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(filename, bytes), params);
     }
 
@@ -557,7 +557,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(String filename, byte bytes[])
+    public static ImageInfo getImageInfo(final String filename, final byte bytes[])
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(filename, bytes), null);
     }
@@ -578,7 +578,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(InputStream is, String filename)
+    public static ImageInfo getImageInfo(final InputStream is, final String filename)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceInputStream(is, filename), null);
     }
@@ -601,8 +601,8 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(InputStream is, String filename,
-            Map<String,Object> params) throws ImageReadException, IOException {
+    public static ImageInfo getImageInfo(final InputStream is, final String filename,
+            final Map<String,Object> params) throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -620,7 +620,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(byte bytes[])
+    public static ImageInfo getImageInfo(final byte bytes[])
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(bytes), null);
     }
@@ -641,7 +641,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(byte bytes[], Map<String,Object> params)
+    public static ImageInfo getImageInfo(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(bytes), params);
     }
@@ -662,7 +662,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(File file, Map<String,Object> params)
+    public static ImageInfo getImageInfo(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceFile(file), params);
     }
@@ -681,39 +681,39 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(File file) throws ImageReadException,
+    public static ImageInfo getImageInfo(final File file) throws ImageReadException,
             IOException {
         return getImageInfo(file, null);
     }
 
-    private static ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
+    private static ImageInfo getImageInfo(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
-        ImageInfo imageInfo = imageParser.getImageInfo(byteSource, params);
+        final ImageInfo imageInfo = imageParser.getImageInfo(byteSource, params);
 
         return imageInfo;
     }
 
-    private static ImageParser getImageParser(ByteSource byteSource)
+    private static ImageParser getImageParser(final ByteSource byteSource)
             throws ImageReadException, IOException {
-        ImageFormat format = guessFormat(byteSource);
+        final ImageFormat format = guessFormat(byteSource);
         if (!format.equals(ImageFormat.IMAGE_FORMAT_UNKNOWN)) {
 
-            ImageParser imageParsers[] = ImageParser.getAllImageParsers();
+            final ImageParser imageParsers[] = ImageParser.getAllImageParsers();
 
-            for (ImageParser imageParser : imageParsers) {
+            for (final ImageParser imageParser : imageParsers) {
                 if (imageParser.canAcceptType(format)) {
                     return imageParser;
                 }
             }
         }
 
-        String filename = byteSource.getFilename();
+        final String filename = byteSource.getFilename();
         if (filename != null) {
-            ImageParser imageParsers[] = ImageParser.getAllImageParsers();
+            final ImageParser imageParsers[] = ImageParser.getAllImageParsers();
 
-            for (ImageParser imageParser : imageParsers) {
+            for (final ImageParser imageParser : imageParsers) {
                 if (imageParser.canAcceptExtension(filename)) {
                     return imageParser;
                 }
@@ -733,7 +733,7 @@ public abstract class Imaging implements
      *            Filename associated with image data (optional).
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(InputStream is, String filename)
+    public static Dimension getImageSize(final InputStream is, final String filename)
             throws ImageReadException, IOException {
         return getImageSize(is, filename, null);
     }
@@ -750,8 +750,8 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(InputStream is, String filename,
-            Map<String,Object> params) throws ImageReadException, IOException {
+    public static Dimension getImageSize(final InputStream is, final String filename,
+            final Map<String,Object> params) throws ImageReadException, IOException {
         return getImageSize(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -763,7 +763,7 @@ public abstract class Imaging implements
      *            Byte array containing an image file.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(byte bytes[])
+    public static Dimension getImageSize(final byte bytes[])
             throws ImageReadException, IOException {
         return getImageSize(bytes, null);
     }
@@ -778,7 +778,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(byte bytes[], Map<String,Object> params)
+    public static Dimension getImageSize(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageSize(new ByteSourceArray(bytes), params);
     }
@@ -791,7 +791,7 @@ public abstract class Imaging implements
      *            File containing image data.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(File file) throws ImageReadException,
+    public static Dimension getImageSize(final File file) throws ImageReadException,
             IOException {
         return getImageSize(file, null);
     }
@@ -806,14 +806,14 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(File file, Map<String,Object> params)
+    public static Dimension getImageSize(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageSize(new ByteSourceFile(file), params);
     }
 
-    public static Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
+    public static Dimension getImageSize(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getImageSize(byteSource, params);
     }
@@ -828,7 +828,7 @@ public abstract class Imaging implements
      *            Filename associated with image data (optional).
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(InputStream is, String filename)
+    public static String getXmpXml(final InputStream is, final String filename)
             throws ImageReadException, IOException {
         return getXmpXml(is, filename, null);
     }
@@ -845,7 +845,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(InputStream is, String filename, Map<String,Object> params)
+    public static String getXmpXml(final InputStream is, final String filename, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceInputStream(is, filename), params);
     }
@@ -858,7 +858,7 @@ public abstract class Imaging implements
      *            Byte array containing an image file.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(byte bytes[]) throws ImageReadException,
+    public static String getXmpXml(final byte bytes[]) throws ImageReadException,
             IOException {
         return getXmpXml(bytes, null);
     }
@@ -873,7 +873,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(byte bytes[], Map<String,Object> params)
+    public static String getXmpXml(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceArray(bytes), params);
     }
@@ -886,7 +886,7 @@ public abstract class Imaging implements
      *            File containing image data.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(File file) throws ImageReadException,
+    public static String getXmpXml(final File file) throws ImageReadException,
             IOException {
         return getXmpXml(file, null);
     }
@@ -901,7 +901,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(File file, Map<String,Object> params)
+    public static String getXmpXml(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceFile(file), params);
     }
@@ -916,9 +916,9 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(ByteSource byteSource, Map<String,Object> params)
+    public static String getXmpXml(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getXmpXml(byteSource, params);
     }
@@ -941,7 +941,7 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(byte bytes[])
+    public static IImageMetadata getMetadata(final byte bytes[])
             throws ImageReadException, IOException {
         return getMetadata(bytes, null);
     }
@@ -966,7 +966,7 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(byte bytes[], Map<String,Object> params)
+    public static IImageMetadata getMetadata(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getMetadata(new ByteSourceArray(bytes), params);
     }
@@ -991,7 +991,7 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(InputStream is, String filename)
+    public static IImageMetadata getMetadata(final InputStream is, final String filename)
             throws ImageReadException, IOException {
         return getMetadata(is, filename, null);
     }
@@ -1018,8 +1018,8 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(InputStream is, String filename,
-            Map<String,Object> params) throws ImageReadException, IOException {
+    public static IImageMetadata getMetadata(final InputStream is, final String filename,
+            final Map<String,Object> params) throws ImageReadException, IOException {
         return getMetadata(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -1041,7 +1041,7 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(File file)
+    public static IImageMetadata getMetadata(final File file)
             throws ImageReadException, IOException {
         return getMetadata(file, null);
     }
@@ -1066,14 +1066,14 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(File file, Map<String,Object> params)
+    public static IImageMetadata getMetadata(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getMetadata(new ByteSourceFile(file), params);
     }
 
-    private static IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
+    private static IImageMetadata getMetadata(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getMetadata(byteSource, params);
     }
@@ -1089,7 +1089,7 @@ public abstract class Imaging implements
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public static String dumpImageFile(byte bytes[]) throws ImageReadException,
+    public static String dumpImageFile(final byte bytes[]) throws ImageReadException,
             IOException {
         return dumpImageFile(new ByteSourceArray(bytes));
     }
@@ -1105,14 +1105,14 @@ public abstract class Imaging implements
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public static String dumpImageFile(File file) throws ImageReadException,
+    public static String dumpImageFile(final File file) throws ImageReadException,
             IOException {
         return dumpImageFile(new ByteSourceFile(file));
     }
 
-    private static String dumpImageFile(ByteSource byteSource)
+    private static String dumpImageFile(final ByteSource byteSource)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.dumpImageFile(byteSource);
     }
@@ -1127,7 +1127,7 @@ public abstract class Imaging implements
      * @throws ImageReadException in the event of unreadable data.
      * @throws IOException in the event of an unrecoverable I/O condition.
      */
-    public static FormatCompliance getFormatCompliance(byte bytes[])
+    public static FormatCompliance getFormatCompliance(final byte bytes[])
             throws ImageReadException, IOException {
         return getFormatCompliance(new ByteSourceArray(bytes));
     }
@@ -1142,14 +1142,14 @@ public abstract class Imaging implements
      * @throws ImageReadException in the event of unreadable data.
      * @throws IOException in the event of an unrecoverable I/O condition.
      */
-    public static FormatCompliance getFormatCompliance(File file)
+    public static FormatCompliance getFormatCompliance(final File file)
             throws ImageReadException, IOException {
         return getFormatCompliance(new ByteSourceFile(file));
     }
 
-    private static FormatCompliance getFormatCompliance(ByteSource byteSource)
+    private static FormatCompliance getFormatCompliance(final ByteSource byteSource)
             throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getFormatCompliance(byteSource);
     }
@@ -1165,8 +1165,8 @@ public abstract class Imaging implements
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public static List<BufferedImage> getAllBufferedImages(InputStream is,
-            String filename) throws ImageReadException, IOException {
+    public static List<BufferedImage> getAllBufferedImages(final InputStream is,
+            final String filename) throws ImageReadException, IOException {
         return getAllBufferedImages(new ByteSourceInputStream(is, filename));
     }
 
@@ -1181,7 +1181,7 @@ public abstract class Imaging implements
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public static List<BufferedImage> getAllBufferedImages(byte bytes[])
+    public static List<BufferedImage> getAllBufferedImages(final byte bytes[])
             throws ImageReadException, IOException {
         return getAllBufferedImages(new ByteSourceArray(bytes));
     }
@@ -1197,15 +1197,15 @@ public abstract class Imaging implements
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public static List<BufferedImage> getAllBufferedImages(File file)
+    public static List<BufferedImage> getAllBufferedImages(final File file)
             throws ImageReadException, IOException {
         return getAllBufferedImages(new ByteSourceFile(file));
     }
 
     
     private static List<BufferedImage> getAllBufferedImages(
-            ByteSource byteSource) throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+            final ByteSource byteSource) throws ImageReadException, IOException {
+        final ImageParser imageParser = getImageParser(byteSource);
 
         return imageParser.getAllBufferedImages(byteSource);
     }
@@ -1227,7 +1227,7 @@ public abstract class Imaging implements
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
 
-    public static BufferedImage getBufferedImage(InputStream is)
+    public static BufferedImage getBufferedImage(final InputStream is)
             throws ImageReadException, IOException {
         return getBufferedImage(is, null);
     }
@@ -1254,7 +1254,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(InputStream is, Map<String,Object> params)
+    public static BufferedImage getBufferedImage(final InputStream is, final Map<String,Object> params)
             throws ImageReadException, IOException {
         String filename = null;
         if (params != null && params.containsKey(PARAM_KEY_FILENAME)) {
@@ -1278,7 +1278,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(byte bytes[])
+    public static BufferedImage getBufferedImage(final byte bytes[])
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceArray(bytes), null);
     }
@@ -1304,7 +1304,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */ 
-    public static BufferedImage getBufferedImage(byte bytes[], Map<String,Object> params)
+    public static BufferedImage getBufferedImage(final byte bytes[], final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceArray(bytes), params);
     }
@@ -1327,7 +1327,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(File file)
+    public static BufferedImage getBufferedImage(final File file)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceFile(file), null);
     }
@@ -1352,16 +1352,16 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(File file, Map<String,Object> params)
+    public static BufferedImage getBufferedImage(final File file, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceFile(file), params);
     }
 
     
     
-    private static BufferedImage getBufferedImage(ByteSource byteSource,
+    private static BufferedImage getBufferedImage(final ByteSource byteSource,
             Map<String,Object> params) throws ImageReadException, IOException {
-        ImageParser imageParser = getImageParser(byteSource);
+        final ImageParser imageParser = getImageParser(byteSource);
         if (null == params) {
             params = new HashMap<String,Object>();
         }
@@ -1392,8 +1392,8 @@ public abstract class Imaging implements
      * @throws IOException in the event of an unrecoverable I/O exception.
      * @see ImagingConstants
      */    
-    public static void writeImage(BufferedImage src, File file,
-            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
+    public static void writeImage(final BufferedImage src, final File file,
+            final ImageFormat format, final Map<String,Object> params) throws ImageWriteException,
             IOException {
         OutputStream os = null;
 
@@ -1407,7 +1407,7 @@ public abstract class Imaging implements
                 if (os != null) {
                     os.close();
                 }
-            } catch (Exception e) {
+            } catch (final Exception e) {
                 Debug.debug(e);
             }
         }
@@ -1437,10 +1437,10 @@ public abstract class Imaging implements
      * @throws IOException in the event of an unrecoverable I/O exception.
      * @see ImagingConstants
      */   
-    public static byte[] writeImageToBytes(BufferedImage src,
-            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
+    public static byte[] writeImageToBytes(final BufferedImage src,
+            final ImageFormat format, final Map<String,Object> params) throws ImageWriteException,
             IOException {
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        final ByteArrayOutputStream os = new ByteArrayOutputStream();
 
         writeImage(src, os, format, params);
 
@@ -1471,10 +1471,10 @@ public abstract class Imaging implements
      * @throws IOException in the event of an unrecoverable I/O exception.
      * @see ImagingConstants
      */    
-    public static void writeImage(BufferedImage src, OutputStream os,
-            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
+    public static void writeImage(final BufferedImage src, final OutputStream os,
+            final ImageFormat format, Map<String,Object> params) throws ImageWriteException,
             IOException {
-        ImageParser imageParsers[] = ImageParser.getAllImageParsers();
+        final ImageParser imageParsers[] = ImageParser.getAllImageParsers();
 
         // make sure params are non-null
         if (params == null) {
@@ -1483,8 +1483,8 @@ public abstract class Imaging implements
 
         params.put(PARAM_KEY_FORMAT, format);
 
-        for (ImageParser imageParser2 : imageParsers) {
-            ImageParser imageParser = imageParser2;
+        for (final ImageParser imageParser2 : imageParsers) {
+            final ImageParser imageParser = imageParser2;
 
             if (!imageParser.canAcceptType(format)) {
                 continue;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImagingException.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImagingException.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImagingException.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImagingException.java Tue Dec  4 17:23:16 2012
@@ -23,11 +23,11 @@ package org.apache.commons.imaging;
 public class ImagingException extends Exception {
     private static final long serialVersionUID = -1L;
 
-    public ImagingException(String s) {
+    public ImagingException(final String s) {
         super(s);
     }
 
-    public ImagingException(String s, Exception e) {
+    public ImagingException(final String s, final Exception e) {
         super(s, e);
     }
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/PixelDensity.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/PixelDensity.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/PixelDensity.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/PixelDensity.java Tue Dec  4 17:23:16 2012
@@ -26,26 +26,26 @@ public class PixelDensity {
     // / One-tenth of a millimetre units.
     private final int unitLength;
 
-    private PixelDensity(double horizontalDensity, double verticalDensity,
-            int unitLength) {
+    private PixelDensity(final double horizontalDensity, final double verticalDensity,
+            final int unitLength) {
         this.horizontalDensity = horizontalDensity;
         this.verticalDensity = verticalDensity;
         this.unitLength = unitLength;
     }
 
-    public static PixelDensity createUnitless(double x, double y) {
+    public static PixelDensity createUnitless(final double x, final double y) {
         return new PixelDensity(x, y, 0);
     }
 
-    public static PixelDensity createFromPixelsPerInch(double x, double y) {
+    public static PixelDensity createFromPixelsPerInch(final double x, final double y) {
         return new PixelDensity(x, y, 254);
     }
 
-    public static PixelDensity createFromPixelsPerMetre(double x, double y) {
+    public static PixelDensity createFromPixelsPerMetre(final double x, final double y) {
         return new PixelDensity(x, y, 10000);
     }
 
-    public static PixelDensity createFromPixelsPerCentimetre(double x, double y) {
+    public static PixelDensity createFromPixelsPerCentimetre(final double x, final double y) {
         return new PixelDensity(x, y, 100);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorCieLab {
     public final double L, a, b;
 
-    public ColorCieLab(double l, double a, double b) {
+    public ColorCieLab(final double l, final double a, final double b) {
         L = l;
         this.a = a;
         this.b = b;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorCieLch {
     public final double L, C, H;
 
-    public ColorCieLch(double l, double C, double H) {
+    public ColorCieLch(final double l, final double C, final double H) {
         L = l;
         this.C = C;
         this.H = H;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorCieLuv {
     public final double L, u, v;
 
-    public ColorCieLuv(double l, double u, double v) {
+    public ColorCieLuv(final double l, final double u, final double v) {
         L = l;
         this.u = u;
         this.v = v;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorCmy {
     public final double C, M, Y;
 
-    public ColorCmy(double C, double M, double Y) {
+    public ColorCmy(final double C, final double M, final double Y) {
         this.C = C;
         this.M = M;
         this.Y = Y;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorCmyk {
     public final double C, M, Y, K;
 
-    public ColorCmyk(double C, double M, double Y, double K) {
+    public ColorCmyk(final double C, final double M, final double Y, final double K) {
         this.C = C;
         this.M = M;
         this.Y = Y;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorConversions.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorConversions.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorConversions.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorConversions.java Tue Dec  4 17:23:16 2012
@@ -18,7 +18,7 @@ package org.apache.commons.imaging.color
 
 
 public abstract class ColorConversions {
-    public static final ColorCieLab convertXYZtoCIELab(ColorXyz xyz) {
+    public static final ColorCieLab convertXYZtoCIELab(final ColorXyz xyz) {
         return convertXYZtoCIELab(xyz.X, xyz.Y, xyz.Z);
     }
 
@@ -26,8 +26,8 @@ public abstract class ColorConversions {
     private static final double ref_Y = 100.000;
     private static final double ref_Z = 108.883;
 
-    public static final ColorCieLab convertXYZtoCIELab(double X, double Y,
-            double Z) {
+    public static final ColorCieLab convertXYZtoCIELab(final double X, final double Y,
+            final double Z) {
 
         double var_X = X / ref_X; // ref_X = 95.047 Observer= 2°, Illuminant=
                                   // D65
@@ -50,17 +50,17 @@ public abstract class ColorConversions {
             var_Z = (7.787 * var_Z) + (16 / 116.0);
         }
 
-        double L = (116 * var_Y) - 16;
-        double a = 500 * (var_X - var_Y);
-        double b = 200 * (var_Y - var_Z);
+        final double L = (116 * var_Y) - 16;
+        final double a = 500 * (var_X - var_Y);
+        final double b = 200 * (var_Y - var_Z);
         return new ColorCieLab(L, a, b);
     }
 
-    public static final ColorXyz convertCIELabtoXYZ(ColorCieLab cielab) {
+    public static final ColorXyz convertCIELabtoXYZ(final ColorCieLab cielab) {
         return convertCIELabtoXYZ(cielab.L, cielab.a, cielab.b);
     }
 
-    public static final ColorXyz convertCIELabtoXYZ(double L, double a, double b) {
+    public static final ColorXyz convertCIELabtoXYZ(final double L, final double a, final double b) {
         double var_Y = (L + 16) / 116.0;
         double var_X = a / 500 + var_Y;
         double var_Z = var_Y - b / 200.0;
@@ -81,53 +81,53 @@ public abstract class ColorConversions {
             var_Z = (var_Z - 16 / 116.0) / 7.787;
         }
 
-        double X = ref_X * var_X; // ref_X = 95.047 Observer= 2°, Illuminant=
+        final double X = ref_X * var_X; // ref_X = 95.047 Observer= 2°, Illuminant=
                                   // D65
-        double Y = ref_Y * var_Y; // ref_Y = 100.000
-        double Z = ref_Z * var_Z; // ref_Z = 108.883
+        final double Y = ref_Y * var_Y; // ref_Y = 100.000
+        final double Z = ref_Z * var_Z; // ref_Z = 108.883
 
         return new ColorXyz(X, Y, Z);
     }
 
-    public static final ColorHunterLab convertXYZtoHunterLab(ColorXyz xyz) {
+    public static final ColorHunterLab convertXYZtoHunterLab(final ColorXyz xyz) {
         return convertXYZtoHunterLab(xyz.X, xyz.Y, xyz.Z);
     }
 
-    public static final ColorHunterLab convertXYZtoHunterLab(double X,
-            double Y, double Z) {
-        double L = 10 * Math.sqrt(Y);
-        double a = 17.5 * (((1.02 * X) - Y) / Math.sqrt(Y));
-        double b = 7 * ((Y - (0.847 * Z)) / Math.sqrt(Y));
+    public static final ColorHunterLab convertXYZtoHunterLab(final double X,
+            final double Y, final double Z) {
+        final double L = 10 * Math.sqrt(Y);
+        final double a = 17.5 * (((1.02 * X) - Y) / Math.sqrt(Y));
+        final double b = 7 * ((Y - (0.847 * Z)) / Math.sqrt(Y));
 
         return new ColorHunterLab(L, a, b);
     }
 
-    public static final ColorXyz convertHunterLabtoXYZ(ColorHunterLab cielab) {
+    public static final ColorXyz convertHunterLabtoXYZ(final ColorHunterLab cielab) {
         return convertHunterLabtoXYZ(cielab.L, cielab.a, cielab.b);
     }
 
-    public static final ColorXyz convertHunterLabtoXYZ(double L, double a,
-            double b) {
-        double var_Y = L / 10;
-        double var_X = a / 17.5 * L / 10;
-        double var_Z = b / 7 * L / 10;
-
-        double Y = Math.pow(var_Y, 2);
-        double X = (var_X + Y) / 1.02;
-        double Z = -(var_Z - Y) / 0.847;
+    public static final ColorXyz convertHunterLabtoXYZ(final double L, final double a,
+            final double b) {
+        final double var_Y = L / 10;
+        final double var_X = a / 17.5 * L / 10;
+        final double var_Z = b / 7 * L / 10;
+
+        final double Y = Math.pow(var_Y, 2);
+        final double X = (var_X + Y) / 1.02;
+        final double Z = -(var_Z - Y) / 0.847;
 
         return new ColorXyz(X, Y, Z);
     }
 
-    public static final int convertXYZtoRGB(ColorXyz xyz) {
+    public static final int convertXYZtoRGB(final ColorXyz xyz) {
         return convertXYZtoRGB(xyz.X, xyz.Y, xyz.Z);
     }
 
-    public static final int convertXYZtoRGB(double X, double Y, double Z) {
+    public static final int convertXYZtoRGB(final double X, final double Y, final double Z) {
         // Observer = 2°, Illuminant = D65
-        double var_X = X / 100.0; // Where X = 0 ÷ 95.047
-        double var_Y = Y / 100.0; // Where Y = 0 ÷ 100.000
-        double var_Z = Z / 100.0; // Where Z = 0 ÷ 108.883
+        final double var_X = X / 100.0; // Where X = 0 ÷ 95.047
+        final double var_Y = Y / 100.0; // Where Y = 0 ÷ 100.000
+        final double var_Z = Z / 100.0; // Where Z = 0 ÷ 108.883
 
         double var_R = var_X * 3.2406 + var_Y * -1.5372 + var_Z * -0.4986;
         double var_G = var_X * -0.9689 + var_Y * 1.8758 + var_Z * 0.0415;
@@ -149,17 +149,17 @@ public abstract class ColorConversions {
             var_B = 12.92 * var_B;
         }
 
-        double R = (var_R * 255);
-        double G = (var_G * 255);
-        double B = (var_B * 255);
+        final double R = (var_R * 255);
+        final double G = (var_G * 255);
+        final double B = (var_B * 255);
 
         return convertRGBtoRGB(R, G, B);
     }
 
-    public static final ColorXyz convertRGBtoXYZ(int rgb) {
-        int r = 0xff & (rgb >> 16);
-        int g = 0xff & (rgb >> 8);
-        int b = 0xff & (rgb >> 0);
+    public static final ColorXyz convertRGBtoXYZ(final int rgb) {
+        final int r = 0xff & (rgb >> 16);
+        final int g = 0xff & (rgb >> 8);
+        final int b = 0xff & (rgb >> 0);
 
         double var_R = r / 255.0; // Where R = 0 ÷ 255
         double var_G = g / 255.0; // Where G = 0 ÷ 255
@@ -186,29 +186,29 @@ public abstract class ColorConversions {
         var_B = var_B * 100;
 
         // Observer. = 2°, Illuminant = D65
-        double X = var_R * 0.4124 + var_G * 0.3576 + var_B * 0.1805;
-        double Y = var_R * 0.2126 + var_G * 0.7152 + var_B * 0.0722;
-        double Z = var_R * 0.0193 + var_G * 0.1192 + var_B * 0.9505;
+        final double X = var_R * 0.4124 + var_G * 0.3576 + var_B * 0.1805;
+        final double Y = var_R * 0.2126 + var_G * 0.7152 + var_B * 0.0722;
+        final double Z = var_R * 0.0193 + var_G * 0.1192 + var_B * 0.9505;
 
         return new ColorXyz(X, Y, Z);
     }
 
-    public static final ColorCmy convertRGBtoCMY(int rgb) {
-        int R = 0xff & (rgb >> 16);
-        int G = 0xff & (rgb >> 8);
-        int B = 0xff & (rgb >> 0);
+    public static final ColorCmy convertRGBtoCMY(final int rgb) {
+        final int R = 0xff & (rgb >> 16);
+        final int G = 0xff & (rgb >> 8);
+        final int B = 0xff & (rgb >> 0);
 
         // RGB values = 0 ÷ 255
         // CMY values = 0 ÷ 1
 
-        double C = 1 - (R / 255.0);
-        double M = 1 - (G / 255.0);
-        double Y = 1 - (B / 255.0);
+        final double C = 1 - (R / 255.0);
+        final double M = 1 - (G / 255.0);
+        final double Y = 1 - (B / 255.0);
 
         return new ColorCmy(C, M, Y);
     }
 
-    public static final int convertCMYtoRGB(ColorCmy cmy) {
+    public static final int convertCMYtoRGB(final ColorCmy cmy) {
         // From Ghostscript's gdevcdj.c:
         // * Ghostscript: R = (1.0 - C) * (1.0 - K)
         // * Adobe: R = 1.0 - min(1.0, C + K)
@@ -218,14 +218,14 @@ public abstract class ColorConversions {
         // CMY values = 0 ÷ 1
         // RGB values = 0 ÷ 255
 
-        double R = (1 - cmy.C) * 255.0;
-        double G = (1 - cmy.M) * 255.0;
-        double B = (1 - cmy.Y) * 255.0;
+        final double R = (1 - cmy.C) * 255.0;
+        final double G = (1 - cmy.M) * 255.0;
+        final double B = (1 - cmy.Y) * 255.0;
 
         return convertRGBtoRGB(R, G, B);
     }
 
-    public static final ColorCmyk convertCMYtoCMYK(ColorCmy cmy) {
+    public static final ColorCmyk convertCMYtoCMYK(final ColorCmy cmy) {
         // Where CMYK and CMY values = 0 ÷ 1
 
         double C = cmy.C;
@@ -255,12 +255,12 @@ public abstract class ColorConversions {
         return new ColorCmyk(C, M, Y, var_K);
     }
 
-    public static final ColorCmy convertCMYKtoCMY(ColorCmyk cmyk) {
+    public static final ColorCmy convertCMYKtoCMY(final ColorCmyk cmyk) {
         return convertCMYKtoCMY(cmyk.C, cmyk.M, cmyk.Y, cmyk.K);
     }
 
     public static final ColorCmy convertCMYKtoCMY(double C, double M, double Y,
-            double K) {
+            final double K) {
         // Where CMYK and CMY values = 0 ÷ 1
 
         C = (C * (1 - K) + K);
@@ -270,28 +270,28 @@ public abstract class ColorConversions {
         return new ColorCmy(C, M, Y);
     }
 
-    public static final int convertCMYKtoRGB(int c, int m, int y, int k)
+    public static final int convertCMYKtoRGB(final int c, final int m, final int y, final int k)
     // throws ImageReadException, IOException
     {
-        double C = c / 255.0;
-        double M = m / 255.0;
-        double Y = y / 255.0;
-        double K = k / 255.0;
+        final double C = c / 255.0;
+        final double M = m / 255.0;
+        final double Y = y / 255.0;
+        final double K = k / 255.0;
 
         return convertCMYtoRGB(convertCMYKtoCMY(C, M, Y, K));
     }
 
-    public static final ColorHsl convertRGBtoHSL(int rgb) {
+    public static final ColorHsl convertRGBtoHSL(final int rgb) {
 
-        int R = 0xff & (rgb >> 16);
-        int G = 0xff & (rgb >> 8);
-        int B = 0xff & (rgb >> 0);
+        final int R = 0xff & (rgb >> 16);
+        final int G = 0xff & (rgb >> 8);
+        final int B = 0xff & (rgb >> 0);
 
-        double var_R = (R / 255.0); // Where RGB values = 0 ÷ 255
-        double var_G = (G / 255.0);
-        double var_B = (B / 255.0);
+        final double var_R = (R / 255.0); // Where RGB values = 0 ÷ 255
+        final double var_G = (G / 255.0);
+        final double var_B = (B / 255.0);
 
-        double var_Min = Math.min(var_R, Math.min(var_G, var_B)); // Min. value
+        final double var_Min = Math.min(var_R, Math.min(var_G, var_B)); // Min. value
                                                                   // of RGB
         double var_Max;
         boolean maxIsR = false;
@@ -305,9 +305,9 @@ public abstract class ColorConversions {
         } else {
             var_Max = var_B;
         }
-        double del_Max = var_Max - var_Min; // Delta RGB value
+        final double del_Max = var_Max - var_Min; // Delta RGB value
 
-        double L = (var_Max + var_Min) / 2.0;
+        final double L = (var_Max + var_Min) / 2.0;
 
         double H, S;
         // Debug.debug("del_Max", del_Max);
@@ -329,9 +329,9 @@ public abstract class ColorConversions {
 
             // Debug.debug("S", S);
 
-            double del_R = (((var_Max - var_R) / 6) + (del_Max / 2)) / del_Max;
-            double del_G = (((var_Max - var_G) / 6) + (del_Max / 2)) / del_Max;
-            double del_B = (((var_Max - var_B) / 6) + (del_Max / 2)) / del_Max;
+            final double del_R = (((var_Max - var_R) / 6) + (del_Max / 2)) / del_Max;
+            final double del_G = (((var_Max - var_G) / 6) + (del_Max / 2)) / del_Max;
+            final double del_B = (((var_Max - var_B) / 6) + (del_Max / 2)) / del_Max;
 
             if (maxIsR) {
                 H = del_B - del_G;
@@ -356,11 +356,11 @@ public abstract class ColorConversions {
         return new ColorHsl(H, S, L);
     }
 
-    public static int convertHSLtoRGB(ColorHsl hsl) {
+    public static int convertHSLtoRGB(final ColorHsl hsl) {
         return convertHSLtoRGB(hsl.H, hsl.S, hsl.L);
     }
 
-    public static int convertHSLtoRGB(double H, double S, double L) {
+    public static int convertHSLtoRGB(final double H, final double S, final double L) {
         double R, G, B;
 
         if (S == 0) {
@@ -377,7 +377,7 @@ public abstract class ColorConversions {
                 var_2 = (L + S) - (S * L);
             }
 
-            double var_1 = 2 * L - var_2;
+            final double var_1 = 2 * L - var_2;
 
             R = 255 * convertHuetoRGB(var_1, var_2, H + (1 / 3.0));
             G = 255 * convertHuetoRGB(var_1, var_2, H);
@@ -387,7 +387,7 @@ public abstract class ColorConversions {
         return convertRGBtoRGB(R, G, B);
     }
 
-    private static double convertHuetoRGB(double v1, double v2, double vH) {
+    private static double convertHuetoRGB(final double v1, final double v2, double vH) {
         if (vH < 0) {
             vH += 1;
         }
@@ -406,16 +406,16 @@ public abstract class ColorConversions {
         return (v1);
     }
 
-    public static final ColorHsv convertRGBtoHSV(int rgb) {
-        int R = 0xff & (rgb >> 16);
-        int G = 0xff & (rgb >> 8);
-        int B = 0xff & (rgb >> 0);
-
-        double var_R = (R / 255.0); // RGB values = 0 ÷ 255
-        double var_G = (G / 255.0);
-        double var_B = (B / 255.0);
+    public static final ColorHsv convertRGBtoHSV(final int rgb) {
+        final int R = 0xff & (rgb >> 16);
+        final int G = 0xff & (rgb >> 8);
+        final int B = 0xff & (rgb >> 0);
+
+        final double var_R = (R / 255.0); // RGB values = 0 ÷ 255
+        final double var_G = (G / 255.0);
+        final double var_B = (B / 255.0);
 
-        double var_Min = Math.min(var_R, Math.min(var_G, var_B)); // Min. value
+        final double var_Min = Math.min(var_R, Math.min(var_G, var_B)); // Min. value
                                                                   // of RGB
         boolean maxIsR = false;
         boolean maxIsG = false;
@@ -429,9 +429,9 @@ public abstract class ColorConversions {
         } else {
             var_Max = var_B;
         }
-        double del_Max = var_Max - var_Min; // Delta RGB value
+        final double del_Max = var_Max - var_Min; // Delta RGB value
 
-        double V = var_Max;
+        final double V = var_Max;
 
         double H, S;
         if (del_Max == 0) {
@@ -442,9 +442,9 @@ public abstract class ColorConversions {
         // Chromatic data...
             S = del_Max / var_Max;
 
-            double del_R = (((var_Max - var_R) / 6) + (del_Max / 2)) / del_Max;
-            double del_G = (((var_Max - var_G) / 6) + (del_Max / 2)) / del_Max;
-            double del_B = (((var_Max - var_B) / 6) + (del_Max / 2)) / del_Max;
+            final double del_R = (((var_Max - var_R) / 6) + (del_Max / 2)) / del_Max;
+            final double del_G = (((var_Max - var_G) / 6) + (del_Max / 2)) / del_Max;
+            final double del_B = (((var_Max - var_B) / 6) + (del_Max / 2)) / del_Max;
 
             if (maxIsR) {
                 H = del_B - del_G;
@@ -465,11 +465,11 @@ public abstract class ColorConversions {
         return new ColorHsv(H, S, V);
     }
 
-    public static int convertHSVtoRGB(ColorHsv HSV) {
+    public static int convertHSVtoRGB(final ColorHsv HSV) {
         return convertHSVtoRGB(HSV.H, HSV.S, HSV.V);
     }
 
-    public static int convertHSVtoRGB(double H, double S, double V) {
+    public static int convertHSVtoRGB(final double H, final double S, final double V) {
         double R, G, B;
 
         if (S == 0) {
@@ -482,10 +482,10 @@ public abstract class ColorConversions {
             if (var_h == 6) {
                 var_h = 0; // H must be < 1
             }
-            double var_i = Math.floor(var_h); // Or ... var_i = floor( var_h )
-            double var_1 = V * (1 - S);
-            double var_2 = V * (1 - S * (var_h - var_i));
-            double var_3 = V * (1 - S * (1 - (var_h - var_i)));
+            final double var_i = Math.floor(var_h); // Or ... var_i = floor( var_h )
+            final double var_1 = V * (1 - S);
+            final double var_2 = V * (1 - S * (var_h - var_i));
+            final double var_3 = V * (1 - S * (1 - (var_h - var_i)));
 
             double var_r, var_g, var_b;
 
@@ -523,24 +523,24 @@ public abstract class ColorConversions {
         return convertRGBtoRGB(R, G, B);
     }
 
-    public static final int convertCMYKtoRGB_Adobe(int sc, int sm, int sy,
-            int sk) {
-        int red = 255 - (sc + sk);
-        int green = 255 - (sm + sk);
-        int blue = 255 - (sy + sk);
+    public static final int convertCMYKtoRGB_Adobe(final int sc, final int sm, final int sy,
+            final int sk) {
+        final int red = 255 - (sc + sk);
+        final int green = 255 - (sm + sk);
+        final int blue = 255 - (sy + sk);
 
         return convertRGBtoRGB(red, green, blue);
     }
 
-    private static double cube(double f) {
+    private static double cube(final double f) {
         return f * f * f;
     }
 
-    private static double square(double f) {
+    private static double square(final double f) {
         return f * f;
     }
 
-    public static final int convertCIELabtoARGBTest(int cieL, int cieA, int cieB) {
+    public static final int convertCIELabtoARGBTest(final int cieL, final int cieA, final int cieB) {
         double X, Y, Z;
 
         {
@@ -549,9 +549,9 @@ public abstract class ColorConversions {
             double var_X = cieA / 500.0 + var_Y;
             double var_Z = var_Y - cieB / 200.0;
 
-            double var_x_cube = cube(var_X);
-            double var_y_cube = cube(var_Y);
-            double var_z_cube = cube(var_Z);
+            final double var_x_cube = cube(var_X);
+            final double var_y_cube = cube(var_Y);
+            final double var_z_cube = cube(var_Z);
 
             if (var_y_cube > 0.008856) {
                 var_Y = var_y_cube;
@@ -583,9 +583,9 @@ public abstract class ColorConversions {
 
         double R, G, B;
         {
-            double var_X = X / 100; // X = From 0 to ref_X
-            double var_Y = Y / 100; // Y = From 0 to ref_Y
-            double var_Z = Z / 100; // Z = From 0 to ref_Y
+            final double var_X = X / 100; // X = From 0 to ref_X
+            final double var_Y = Y / 100; // Y = From 0 to ref_Y
+            final double var_Z = Z / 100; // Z = From 0 to ref_Y
 
             double var_R = var_X * 3.2406 + var_Y * -1.5372 + var_Z * -0.4986;
             double var_G = var_X * -0.9689 + var_Y * 1.8758 + var_Z * 0.0415;
@@ -616,7 +616,7 @@ public abstract class ColorConversions {
         return convertRGBtoRGB(R, G, B);
     }
 
-    private static final int convertRGBtoRGB(double R, double G, double B) {
+    private static final int convertRGBtoRGB(final double R, final double G, final double B) {
         int red = (int) Math.round(R);
         int green = (int) Math.round(G);
         int blue = (int) Math.round(B);
@@ -625,8 +625,8 @@ public abstract class ColorConversions {
         green = Math.min(255, Math.max(0, green));
         blue = Math.min(255, Math.max(0, blue));
 
-        int alpha = 0xff;
-        int rgb = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0);
+        final int alpha = 0xff;
+        final int rgb = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0);
 
         return rgb;
     }
@@ -636,17 +636,17 @@ public abstract class ColorConversions {
         green = Math.min(255, Math.max(0, green));
         blue = Math.min(255, Math.max(0, blue));
 
-        int alpha = 0xff;
-        int rgb = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0);
+        final int alpha = 0xff;
+        final int rgb = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0);
 
         return rgb;
     }
 
-    public static ColorCieLch convertCIELabtoCIELCH(ColorCieLab cielab) {
+    public static ColorCieLch convertCIELabtoCIELCH(final ColorCieLab cielab) {
         return convertCIELabtoCIELCH(cielab.L, cielab.a, cielab.b);
     }
 
-    public static ColorCieLch convertCIELabtoCIELCH(double L, double a, double b) {
+    public static ColorCieLch convertCIELabtoCIELCH(final double L, final double a, final double b) {
         double var_H = Math.atan2(b, a); // Quadrant by signs
 
         if (var_H > 0) {
@@ -656,43 +656,43 @@ public abstract class ColorConversions {
         }
 
         // L = L;
-        double C = Math.sqrt(square(a) + square(b));
-        double H = var_H;
+        final double C = Math.sqrt(square(a) + square(b));
+        final double H = var_H;
 
         return new ColorCieLch(L, C, H);
     }
 
-    public static ColorCieLab convertCIELCHtoCIELab(ColorCieLch cielch) {
+    public static ColorCieLab convertCIELCHtoCIELab(final ColorCieLch cielch) {
         return convertCIELCHtoCIELab(cielch.L, cielch.C, cielch.H);
     }
 
-    public static ColorCieLab convertCIELCHtoCIELab(double L, double C, double H) {
+    public static ColorCieLab convertCIELCHtoCIELab(final double L, final double C, final double H) {
         // Where CIE-H° = 0 ÷ 360°
 
         // CIE-L* = CIE-L;
-        double a = Math.cos(degree_2_radian(H)) * C;
-        double b = Math.sin(degree_2_radian(H)) * C;
+        final double a = Math.cos(degree_2_radian(H)) * C;
+        final double b = Math.sin(degree_2_radian(H)) * C;
 
         return new ColorCieLab(L, a, b);
     }
 
-    public static double degree_2_radian(double degree) {
+    public static double degree_2_radian(final double degree) {
         return degree * Math.PI / 180.0;
     }
 
-    public static double radian_2_degree(double radian) {
+    public static double radian_2_degree(final double radian) {
         return radian * 180.0 / Math.PI;
     }
 
-    public static ColorCieLuv convertXYZtoCIELuv(ColorXyz xyz) {
+    public static ColorCieLuv convertXYZtoCIELuv(final ColorXyz xyz) {
         return convertXYZtoCIELuv(xyz.X, xyz.Y, xyz.Z);
     }
 
-    public static ColorCieLuv convertXYZtoCIELuv(double X, double Y, double Z) {
+    public static ColorCieLuv convertXYZtoCIELuv(final double X, final double Y, final double Z) {
         // problems here with div by zero
 
-        double var_U = (4 * X) / (X + (15 * Y) + (3 * Z));
-        double var_V = (9 * Y) / (X + (15 * Y) + (3 * Z));
+        final double var_U = (4 * X) / (X + (15 * Y) + (3 * Z));
+        final double var_V = (9 * Y) / (X + (15 * Y) + (3 * Z));
 
         // Debug.debug("var_U", var_U);
         // Debug.debug("var_V", var_V);
@@ -706,30 +706,30 @@ public abstract class ColorConversions {
             var_Y = (7.787 * var_Y) + (16 / 116.0);
         }
 
-        double ref_X = 95.047; // Observer= 2°, Illuminant= D65
-        double ref_Y = 100.000;
-        double ref_Z = 108.883;
+        final double ref_X = 95.047; // Observer= 2°, Illuminant= D65
+        final double ref_Y = 100.000;
+        final double ref_Z = 108.883;
 
         // Debug.debug("var_Y", var_Y);
 
-        double ref_U = (4 * ref_X) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
-        double ref_V = (9 * ref_Y) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
+        final double ref_U = (4 * ref_X) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
+        final double ref_V = (9 * ref_Y) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
 
         // Debug.debug("ref_U", ref_U);
         // Debug.debug("ref_V", ref_V);
 
-        double L = (116 * var_Y) - 16;
-        double u = 13 * L * (var_U - ref_U);
-        double v = 13 * L * (var_V - ref_V);
+        final double L = (116 * var_Y) - 16;
+        final double u = 13 * L * (var_U - ref_U);
+        final double v = 13 * L * (var_V - ref_V);
 
         return new ColorCieLuv(L, u, v);
     }
 
-    public static ColorXyz convertCIELuvtoXYZ(ColorCieLuv cielch) {
+    public static ColorXyz convertCIELuvtoXYZ(final ColorCieLuv cielch) {
         return convertCIELuvtoXYZ(cielch.L, cielch.u, cielch.v);
     }
 
-    public static ColorXyz convertCIELuvtoXYZ(double L, double u, double v) {
+    public static ColorXyz convertCIELuvtoXYZ(final double L, final double u, final double v) {
         // problems here with div by zero
 
         double var_Y = (L + 16) / 116;
@@ -739,18 +739,18 @@ public abstract class ColorConversions {
             var_Y = (var_Y - 16 / 116) / 7.787;
         }
 
-        double ref_X = 95.047; // Observer= 2°, Illuminant= D65
-        double ref_Y = 100.000;
-        double ref_Z = 108.883;
-
-        double ref_U = (4 * ref_X) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
-        double ref_V = (9 * ref_Y) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
-        double var_U = u / (13 * L) + ref_U;
-        double var_V = v / (13 * L) + ref_V;
-
-        double Y = var_Y * 100;
-        double X = -(9 * Y * var_U) / ((var_U - 4) * var_V - var_U * var_V);
-        double Z = (9 * Y - (15 * var_V * Y) - (var_V * X)) / (3 * var_V);
+        final double ref_X = 95.047; // Observer= 2°, Illuminant= D65
+        final double ref_Y = 100.000;
+        final double ref_Z = 108.883;
+
+        final double ref_U = (4 * ref_X) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
+        final double ref_V = (9 * ref_Y) / (ref_X + (15 * ref_Y) + (3 * ref_Z));
+        final double var_U = u / (13 * L) + ref_U;
+        final double var_V = v / (13 * L) + ref_V;
+
+        final double Y = var_Y * 100;
+        final double X = -(9 * Y * var_U) / ((var_U - 4) * var_V - var_U * var_V);
+        final double Z = (9 * Y - (15 * var_V * Y) - (var_V * X)) / (3 * var_V);
 
         return new ColorXyz(X, Y, Z);
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorHsl {
     public final double H, S, L;
 
-    public ColorHsl(double h, double s, double v) {
+    public ColorHsl(final double h, final double s, final double v) {
         H = h;
         S = s;
         L = v;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorHsv {
     public final double H, S, V;
 
-    public ColorHsv(double h, double s, double v) {
+    public ColorHsv(final double h, final double s, final double v) {
         H = h;
         S = s;
         V = v;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorHunterLab {
     public final double L, a, b;
 
-    public ColorHunterLab(double l, double a, double b) {
+    public ColorHunterLab(final double l, final double a, final double b) {
         L = l;
         this.a = a;
         this.b = b;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java Tue Dec  4 17:23:16 2012
@@ -19,7 +19,7 @@ package org.apache.commons.imaging.color
 public final class ColorXyz {
     public final double X, Y, Z;
 
-    public ColorXyz(double x, double y, double z) {
+    public ColorXyz(final double x, final double y, final double z) {
         X = x;
         Y = y;
         Z = z;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java Tue Dec  4 17:23:16 2012
@@ -27,7 +27,7 @@ import org.apache.commons.imaging.ImageR
 public class BasicCParser {
     private final PushbackInputStream is;
 
-    public BasicCParser(ByteArrayInputStream is) {
+    public BasicCParser(final ByteArrayInputStream is) {
         this.is = new PushbackInputStream(is);
     }
 
@@ -38,7 +38,7 @@ public class BasicCParser {
         boolean inString = false;
         boolean inIdentifier = false;
         boolean hadBackSlash = false;
-        StringBuilder token = new StringBuilder();
+        final StringBuilder token = new StringBuilder();
         for (int c = is.read(); c != -1; c = is.read()) {
             if (inString) {
                 if (c == '\\') {
@@ -94,8 +94,8 @@ public class BasicCParser {
         return null;
     }
 
-    public static ByteArrayOutputStream preprocess(InputStream is,
-            StringBuilder firstComment, Map<String, String> defines)
+    public static ByteArrayOutputStream preprocess(final InputStream is,
+            final StringBuilder firstComment, final Map<String, String> defines)
             throws IOException, ImageReadException {
         boolean inString = false;
         boolean inComment = false;
@@ -103,9 +103,9 @@ public class BasicCParser {
         boolean hadSlash = false;
         boolean hadStar = false;
         boolean hadBackSlash = false;
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        final ByteArrayOutputStream out = new ByteArrayOutputStream();
         boolean seenFirstComment = (firstComment == null);
-        StringBuilder directiveBuffer = new StringBuilder();
+        final StringBuilder directiveBuffer = new StringBuilder();
         for (int c = is.read(); c != -1; c = is.read()) {
             if (inComment) {
                 if (c == '*') {
@@ -156,7 +156,7 @@ public class BasicCParser {
             } else if (inDirective) {
                 if (c == '\r' || c == '\n') {
                     inDirective = false;
-                    String[] tokens = tokenizeRow(directiveBuffer.toString());
+                    final String[] tokens = tokenizeRow(directiveBuffer.toString());
                     if (tokens.length < 2 || tokens.length > 3) {
                         throw new ImageReadException(
                                 "Bad preprocessor directive");
@@ -227,17 +227,17 @@ public class BasicCParser {
         return out;
     }
 
-    public static String[] tokenizeRow(String row) {
-        String[] tokens = row.split("[ \t]");
+    public static String[] tokenizeRow(final String row) {
+        final String[] tokens = row.split("[ \t]");
         int numLiveTokens = 0;
-        for (String token : tokens) {
+        for (final String token : tokens) {
             if (token != null && token.length() > 0) {
                 ++numLiveTokens;
             }
         }
-        String[] liveTokens = new String[numLiveTokens];
+        final String[] liveTokens = new String[numLiveTokens];
         int next = 0;
-        for (String token : tokens) {
+        for (final String token : tokens) {
             if (token != null && token.length() > 0) {
                 liveTokens[next++] = token;
             }
@@ -245,7 +245,7 @@ public class BasicCParser {
         return liveTokens;
     }
 
-    public static void unescapeString(StringBuilder stringBuilder, String string)
+    public static void unescapeString(final StringBuilder stringBuilder, final String string)
             throws ImageReadException {
         if (string.length() < 2) {
             throw new ImageReadException("Parsing XPM file failed, "
@@ -258,7 +258,7 @@ public class BasicCParser {
         }
         boolean hadBackSlash = false;
         for (int i = 1; i < (string.length() - 1); i++) {
-            char c = string.charAt(i);
+            final char c = string.charAt(i);
             if (hadBackSlash) {
                 if (c == '\\') {
                     stringBuilder.append('\\');
@@ -272,13 +272,13 @@ public class BasicCParser {
                                 "Parsing XPM file failed, "
                                         + "hex constant in string too short");
                     }
-                    char hex1 = string.charAt(i + 1);
-                    char hex2 = string.charAt(i + 2);
+                    final char hex1 = string.charAt(i + 1);
+                    final char hex2 = string.charAt(i + 2);
                     i += 2;
                     int constant;
                     try {
                         constant = Integer.parseInt("" + hex1 + hex2, 16);
-                    } catch (NumberFormatException nfe) {
+                    } catch (final NumberFormatException nfe) {
                         throw new ImageReadException(
                                 "Parsing XPM file failed, "
                                         + "hex constant invalid", nfe);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryConstant.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryConstant.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryConstant.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryConstant.java Tue Dec  4 17:23:16 2012
@@ -23,7 +23,7 @@ import java.util.Arrays;
 public class BinaryConstant implements Cloneable {
     private final byte[] value;
 
-    public BinaryConstant(byte[] value) {
+    public BinaryConstant(final byte[] value) {
         this.value = value.clone();
     }
 
@@ -33,22 +33,22 @@ public class BinaryConstant implements C
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (obj == null) {
             return false;
         }
         if (!(obj instanceof BinaryConstant)) {
             return false;
         }
-        BinaryConstant other = (BinaryConstant) obj;
+        final BinaryConstant other = (BinaryConstant) obj;
         return equals(other.value);
     }
 
-    public boolean equals(byte[] bytes) {
+    public boolean equals(final byte[] bytes) {
         return Arrays.equals(value, bytes);
     }
 
-    public boolean equals(byte[] bytes, int offset, int length) {
+    public boolean equals(final byte[] bytes, final int offset, final int length) {
         if (value.length != length) {
             return false;
         }
@@ -65,7 +65,7 @@ public class BinaryConstant implements C
         return Arrays.hashCode(value);
     }
 
-    public byte get(int i) {
+    public byte get(final int i) {
         return value[i];
     }
 
@@ -77,8 +77,8 @@ public class BinaryConstant implements C
         return value.clone();
     }
 
-    public void writeTo(OutputStream os) throws IOException {
-        for (byte element : value) {
+    public void writeTo(final OutputStream os) throws IOException {
+        for (final byte element : value) {
             os.write(element);
         }
     }



Mime
View raw message