commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1390837 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common: ./ bytesource/ mylzw/
Date Thu, 27 Sep 2012 04:35:40 GMT
Author: damjan
Date: Thu Sep 27 04:35:39 2012
New Revision: 1390837

URL: http://svn.apache.org/viewvc?rev=1390837&view=rev
Log:
Finish brace cleanups for the org.apache.commons.imaging.common package.


Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileFunctions.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryInputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStreamFlexible.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageMetadata.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/MyByteArrayOutputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/PackBits.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumber.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RgbBufferedImageFactory.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/SimpleBufferedImageFactory.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/BitsToByteInputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileFunctions.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileFunctions.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileFunctions.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileFunctions.java Thu Sep 27 04:35:39 2012
@@ -65,8 +65,9 @@ public class BinaryFileFunctions impleme
         pw.print(msg + ": " + data + " (");
         int byteData = data;
         for (int i = 0; i < bytes; i++) {
-            if (i > 0)
+            if (i > 0) {
                 pw.print(",");
+            }
             int singleByte = 0xff & byteData;
             pw.print((char) singleByte + " [" + singleByte + "]");
             byteData >>= 8;
@@ -77,16 +78,20 @@ public class BinaryFileFunctions impleme
     }
 
     public final boolean startsWith(byte haystack[], byte needle[]) {
-        if (needle == null)
+        if (needle == null) {
             return false;
-        if (haystack == null)
+        }
+        if (haystack == null) {
             return false;
-        if (needle.length > haystack.length)
+        }
+        if (needle.length > haystack.length) {
             return false;
+        }
 
         for (int i = 0; i < needle.length; i++) {
-            if (needle[i] != haystack[i])
+            if (needle[i] != haystack[i]) {
                 return false;
+            }
         }
 
         return true;
@@ -107,8 +112,9 @@ public class BinaryFileFunctions impleme
             int data = is.read();
             byte b = (byte) (0xff & data);
 
-            if (data < 0)
+            if (data < 0) {
                 throw new ImageReadException("Unexpected EOF.");
+            }
 
             if (b != expected[i]) {
                 // System.out.println("i" + ": " + i);
@@ -129,11 +135,13 @@ public class BinaryFileFunctions impleme
             int data = is.read();
             byte b = (byte) (0xff & data);
 
-            if (data < 0)
+            if (data < 0) {
                 throw new ImageReadException("Unexpected EOF.");
+            }
 
-            if (b != expected.get(i))
+            if (b != expected.get(i)) {
                 throw new ImageReadException(exception);
+            }
         }
     }
 
@@ -158,8 +166,9 @@ public class BinaryFileFunctions impleme
         long total = 0;
         while (length != total) {
             long skipped = is.skip(length - total);
-            if (skipped < 1)
+            if (skipped < 1) {
                 throw new IOException(exception + " (" + skipped + ")");
+            }
             total += skipped;
         }
     }
@@ -167,12 +176,11 @@ public class BinaryFileFunctions impleme
     protected final void scanForByte(InputStream is, byte value)
             throws IOException {
         int count = 0;
-        for (int i = 0; count < 3; i++)
-        // while(count<3)
-        {
+        for (int i = 0; count < 3; i++) {
             int b = is.read();
-            if (b < 0)
+            if (b < 0) {
                 return;
+            }
             if ((0xff & b) == value) {
                 System.out.println("\t" + i + ": match.");
                 count++;
@@ -189,8 +197,9 @@ public class BinaryFileFunctions impleme
             throw new IOException(exception);
         }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result);
+        }
 
         return (byte) (0xff & result);
     }
@@ -242,18 +251,17 @@ public class BinaryFileFunctions impleme
 
         int result;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        {
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result = ((0xff & byte0) << 24) | ((0xff & byte1) << 16)
                     | ((0xff & byte2) << 8) | ((0xff & byte3) << 0);
         } else {
-            // intel, little endian
             result = ((0xff & byte3) << 24) | ((0xff & byte2) << 16)
                     | ((0xff & byte1) << 8) | ((0xff & byte0) << 0);
         }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result, 4);
+        }
 
         return result;
     }
@@ -280,8 +288,7 @@ public class BinaryFileFunctions impleme
 
     protected final void writeIntInToByteArray(int value, byte bytes[],
             int start, int byteOrder) {
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        {
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             bytes[start + 0] = (byte) (value >> 24);
             bytes[start + 1] = (byte) (value >> 16);
             bytes[start + 2] = (byte) (value >> 8);
@@ -295,10 +302,11 @@ public class BinaryFileFunctions impleme
     }
 
     protected static final byte[] int2ToByteArray(int value, int byteOrder) {
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             return new byte[] { (byte) (value >> 8), (byte) (value >> 0), };
-        else
+        } else {
             return new byte[] { (byte) (value >> 0), (byte) (value >> 8), };
+        }
     }
 
     protected final byte[] convertIntArrayToByteArray(int values[],
@@ -319,8 +327,7 @@ public class BinaryFileFunctions impleme
         for (int i = 0; i < values.length; i++) {
             int value = values[i];
 
-            if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-            {
+            if (byteOrder == BYTE_ORDER_MOTOROLA) {
                 result[i * 2 + 0] = (byte) (value >> 8);
                 result[i * 2 + 1] = (byte) (value >> 0);
             } else {
@@ -335,8 +342,7 @@ public class BinaryFileFunctions impleme
     protected final byte[] convertShortToByteArray(int value, int byteOrder) {
         byte result[] = new byte[2];
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        {
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result[0] = (byte) (value >> 8);
             result[1] = (byte) (value >> 0);
         } else {
@@ -349,10 +355,11 @@ public class BinaryFileFunctions impleme
 
     protected final byte[] convertIntArrayToRationalArray(int numerators[],
             int denominators[], int byteOrder) throws ImageWriteException {
-        if (numerators.length != denominators.length)
+        if (numerators.length != denominators.length) {
             throw new ImageWriteException("numerators.length ("
                     + numerators.length + " != denominators.length ("
                     + denominators.length + ")");
+        }
 
         byte result[] = new byte[numerators.length * 8];
 
@@ -396,23 +403,26 @@ public class BinaryFileFunctions impleme
 
     protected final int convertByteArrayToShort(String name, int index,
             byte bytes[], int byteOrder) throws ImageReadException {
-        if (index + 1 >= bytes.length)
+        if (index + 1 >= bytes.length) {
             throw new ImageReadException("Index out of bounds. Array size: "
                     + bytes.length + ", index: " + index);
+        }
 
         int byte0 = 0xff & bytes[index + 0];
         int byte1 = 0xff & bytes[index + 1];
 
         int result;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result = (byte0 << 8) | byte1;
-        else
+        } else {
             // intel, little endian
             result = (byte1 << 8) | byte0;
+        }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result, 2);
+        }
 
         return result;
     }
@@ -454,9 +464,10 @@ public class BinaryFileFunctions impleme
         while (read < length) {
             int count = is.read(result, read, length - read);
             // Debug.debug("count", count);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception + " count: " + count
                         + " read: " + read + " length: " + length);
+            }
 
             read += count;
         }
@@ -496,8 +507,9 @@ public class BinaryFileFunctions impleme
         byte result[] = new byte[count];
         System.arraycopy(bytes, start, result, 0, count);
 
-        if (debug)
+        if (debug) {
             debugByteArray(name, result);
+        }
 
         return result;
     }
@@ -513,8 +525,9 @@ public class BinaryFileFunctions impleme
     }
 
     public static final byte[] slice(byte bytes[], int start, int count) {
-        if (bytes.length < (start + count))
+        if (bytes.length < (start + count)) {
             return null;
+        }
 
         byte result[] = new byte[count];
         System.arraycopy(bytes, start, result, 0, count);
@@ -523,20 +536,23 @@ public class BinaryFileFunctions impleme
     }
 
     public static final byte[] tail(byte bytes[], int count) {
-        if (count > bytes.length)
+        if (count > bytes.length) {
             count = bytes.length;
+        }
         return slice(bytes, bytes.length - count, count);
     }
 
     public static final byte[] head(byte bytes[], int count) {
-        if (count > bytes.length)
+        if (count > bytes.length) {
             count = bytes.length;
+        }
         return slice(bytes, 0, count);
     }
 
     public final boolean compareByteArrays(byte a[], byte b[]) {
-        if (a.length != b.length)
+        if (a.length != b.length) {
             return false;
+        }
 
         return compareByteArrays(a, 0, b, 0, a.length);
     }
@@ -546,8 +562,9 @@ public class BinaryFileFunctions impleme
         if (a.length < (aStart + length)) {
             return false;
         }
-        if (b.length < (bStart + length))
+        if (b.length < (bStart + length)) {
             return false;
+        }
 
         for (int i = 0; i < length; i++) {
             if (a[aStart + i] != b[bStart + i]) {
@@ -562,22 +579,26 @@ public class BinaryFileFunctions impleme
     }
 
     public static final boolean compareBytes(byte a[], byte b[]) {
-        if (a.length != b.length)
+        if (a.length != b.length) {
             return false;
+        }
 
         return compareBytes(a, 0, b, 0, a.length);
     }
 
     public static final boolean compareBytes(byte a[], int aStart, byte b[],
             int bStart, int length) {
-        if (a.length < (aStart + length))
+        if (a.length < (aStart + length)) {
             return false;
-        if (b.length < (bStart + length))
+        }
+        if (b.length < (bStart + length)) {
             return false;
+        }
 
         for (int i = 0; i < length; i++) {
-            if (a[aStart + i] != b[bStart + i])
+            if (a[aStart + i] != b[bStart + i]) {
                 return false;
+            }
         }
 
         return true;
@@ -591,8 +612,9 @@ public class BinaryFileFunctions impleme
         int read = 0;
         while (read < size) {
             int count = is.read(bytes, read, size - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -608,34 +630,19 @@ public class BinaryFileFunctions impleme
 
         int result;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result = ((0xff & byte0) << 16) | ((0xff & byte1) << 8)
                     | ((0xff & byte2) << 0);
-        else
-            // intel, little endian
+        } else {
             result = ((0xff & byte2) << 16) | ((0xff & byte1) << 8)
                     | ((0xff & byte0) << 0);
+        }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result, 3);
+        }
 
         return result;
-        //
-        //
-        // int size = 3;
-        // byte bytes[] = new byte[size];
-        //
-        // int read = 0;
-        // while (read < size)
-        // {
-        // int count = is.read(bytes, read, size - read);
-        // if (count < 1)
-        // throw new IOException(exception);
-        //
-        // read += count;
-        // }
-        //
-        // return convertByteArrayToInt(name, bytes, 0, 3, byteOrder);
     }
 
     protected final int read2Bytes(String name, InputStream is,
@@ -647,8 +654,9 @@ public class BinaryFileFunctions impleme
         int read = 0;
         while (read < size) {
             int count = is.read(bytes, read, size - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -684,9 +692,9 @@ public class BinaryFileFunctions impleme
 
     public final int findNull(byte src[], int start) {
         for (int i = start; i < src.length; i++) {
-            if (src[i] == 0)
+            if (src[i] == 0) {
                 return i;
-
+            }
         }
         return -1;
     }
@@ -705,8 +713,9 @@ public class BinaryFileFunctions impleme
         int read = 0;
         while (read < length) {
             int count = raf.read(result, read, length - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -731,21 +740,16 @@ public class BinaryFileFunctions impleme
 
         int bits;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        {
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             bits = ((0xff & byte0) << 24) | ((0xff & byte1) << 16)
                     | ((0xff & byte2) << 8) | ((0xff & byte3) << 0);
         } else {
-            // intel, little endian
             bits = ((0xff & byte3) << 24) | ((0xff & byte2) << 16)
                     | ((0xff & byte1) << 8) | ((0xff & byte0) << 0);
         }
 
         float result = Float.intBitsToFloat(bits);
 
-        // if (debug)
-        // debugNumber(name, result, 4);
-
         return result;
     }
 
@@ -774,8 +778,7 @@ public class BinaryFileFunctions impleme
 
         int bits = Float.floatToRawIntBits(value);
 
-        if (byteOrder == BYTE_ORDER_INTEL) // intel, big endian
-        {
+        if (byteOrder == BYTE_ORDER_INTEL) {
             result[0] = (byte) (0xff & (bits >> 0));
             result[1] = (byte) (0xff & (bits >> 8));
             result[2] = (byte) (0xff & (bits >> 16));
@@ -798,8 +801,7 @@ public class BinaryFileFunctions impleme
             int bits = Float.floatToRawIntBits(value);
 
             int start = i * 4;
-            if (byteOrder == BYTE_ORDER_INTEL) // intel, little endian
-            {
+            if (byteOrder == BYTE_ORDER_INTEL) {
                 result[start + 0] = (byte) (0xff & (bits >> 0));
                 result[start + 1] = (byte) (0xff & (bits >> 8));
                 result[start + 2] = (byte) (0xff & (bits >> 16));
@@ -819,8 +821,7 @@ public class BinaryFileFunctions impleme
 
         long bits = Double.doubleToRawLongBits(value);
 
-        if (byteOrder == BYTE_ORDER_INTEL) // intel, little endian
-        {
+        if (byteOrder == BYTE_ORDER_INTEL) {
             result[0] = (byte) (0xff & (bits >> 0));
             result[1] = (byte) (0xff & (bits >> 8));
             result[2] = (byte) (0xff & (bits >> 16));
@@ -851,8 +852,7 @@ public class BinaryFileFunctions impleme
             long bits = Double.doubleToRawLongBits(value);
 
             int start = i * 8;
-            if (byteOrder == BYTE_ORDER_INTEL) // intel, little endian
-            {
+            if (byteOrder == BYTE_ORDER_INTEL) {
                 result[start + 0] = (byte) (0xff & (bits >> 0));
                 result[start + 1] = (byte) (0xff & (bits >> 8));
                 result[start + 2] = (byte) (0xff & (bits >> 16));
@@ -893,15 +893,13 @@ public class BinaryFileFunctions impleme
 
         long bits;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        {
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             bits = ((0xffL & byte0) << 56) | ((0xffL & byte1) << 48)
                     | ((0xffL & byte2) << 40) | ((0xffL & byte3) << 32)
                     | ((0xffL & byte4) << 24) | ((0xffL & byte5) << 16)
                     | ((0xffL & byte6) << 8) | ((0xffL & byte7) << 0);
 
         } else {
-            // intel, little endian
             bits = ((0xffL & byte7) << 56) | ((0xffL & byte6) << 48)
                     | ((0xffL & byte5) << 40) | ((0xffL & byte4) << 32)
                     | ((0xffL & byte3) << 24) | ((0xffL & byte2) << 16)
@@ -910,49 +908,7 @@ public class BinaryFileFunctions impleme
 
         double result = Double.longBitsToDouble(bits);
 
-        // if (debug)
-        // debugNumber(name, result, 4);
-
         return result;
-
-        // byte array[];
-        // if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
-        // // ?? dunno byte order very likely wrong here.
-        // array = new byte[]{
-        // bytes[start + 0], bytes[start + 1], bytes[start + 2],
-        // bytes[start + 3], bytes[start + 4], bytes[start + 5],
-        // bytes[start + 6], bytes[start + 7],
-        //
-        // };
-        // else
-        // // ?? dunno byte order very likely wrong here.
-        // array = new byte[]{
-        // bytes[start + 3], bytes[start + 2], bytes[start + 1],
-        // bytes[start + 0], bytes[start + 7], bytes[start + 6],
-        // bytes[start + 5], bytes[start + 4],
-        // };
-        //
-        // double result = Double.NaN;
-        //
-        // try
-        // {
-        // ByteArrayInputStream bais = new ByteArrayInputStream(array);
-        // if (start > 0)
-        // {
-        // skipBytes(bais, start);
-        // // bais.skip(start);
-        // }
-        // DataInputStream dis = new DataInputStream(bais);
-        // result = dis.readDouble();
-        //
-        // dis.close();
-        // }
-        // catch (Exception e)
-        // {
-        // Debug.debug(e);
-        // }
-        //
-        // return result;
     }
 
     protected final double[] convertByteArrayToDoubleArray(String name,

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java Thu Sep 27 04:35:39 2012
@@ -36,16 +36,18 @@ public class BinaryFileParser extends Bi
     // protected boolean BYTE_ORDER_reversed = true;
 
     protected void setByteOrder(int a, int b) throws ImageReadException {
-        if (a != b)
+        if (a != b) {
             throw new ImageReadException("Byte Order bytes don't match (" + a
                     + ", " + b + ").");
+        }
 
-        if (a == BYTE_ORDER_MOTOROLA)
+        if (a == BYTE_ORDER_MOTOROLA) {
             byteOrder = a;
-        else if (a == BYTE_ORDER_INTEL)
+        } else if (a == BYTE_ORDER_INTEL) {
             byteOrder = a;
-        else
+        } else {
             throw new ImageReadException("Unknown Byte Order hint: " + a);
+        }
     }
 
     protected void setByteOrder(int byteOrder) {
@@ -91,23 +93,29 @@ public class BinaryFileParser extends Bi
     }
 
     public static boolean byteArrayHasPrefix(byte bytes[], BinaryConstant prefix) {
-        if ((bytes == null) || (bytes.length < prefix.size()))
+        if ((bytes == null) || (bytes.length < prefix.size())) {
             return false;
+        }
 
-        for (int i = 0; i < prefix.size(); i++)
-            if (bytes[i] != prefix.get(i))
+        for (int i = 0; i < prefix.size(); i++) {
+            if (bytes[i] != prefix.get(i)) {
                 return false;
+            }
+        }
 
         return true;
     }
 
     public static boolean byteArrayHasPrefix(byte bytes[], byte prefix[]) {
-        if ((bytes == null) || (bytes.length < prefix.length))
+        if ((bytes == null) || (bytes.length < prefix.length)) {
             return false;
+        }
 
-        for (int i = 0; i < prefix.length; i++)
-            if (bytes[i] != prefix[i])
+        for (int i = 0; i < prefix.length; i++) {
+            if (bytes[i] != prefix[i]) {
                 return false;
+            }
+        }
 
         return true;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryInputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryInputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryInputStream.java Thu Sep 27 04:35:39 2012
@@ -54,16 +54,18 @@ public class BinaryInputStream extends I
     private int byteOrder = BYTE_ORDER_NETWORK;
 
     protected void setByteOrder(int a, int b) throws ImageReadException {
-        if (a != b)
+        if (a != b) {
             throw new ImageReadException("Byte Order bytes don't match (" + a
                     + ", " + b + ").");
+        }
 
-        if (a == BYTE_ORDER_MOTOROLA)
+        if (a == BYTE_ORDER_MOTOROLA) {
             byteOrder = a;
-        else if (a == BYTE_ORDER_INTEL)
+        } else if (a == BYTE_ORDER_INTEL) {
             byteOrder = a;
-        else
+        } else {
             throw new ImageReadException("Unknown Byte Order hint: " + a);
+        }
     }
 
     protected void setByteOrder(int byteOrder) {
@@ -122,8 +124,9 @@ public class BinaryInputStream extends I
         System.out.print(msg + ": " + data + " (");
         int byteData = data;
         for (int i = 0; i < bytes; i++) {
-            if (i > 0)
+            if (i > 0) {
                 System.out.print(",");
+            }
             int singleByte = 0xff & byteData;
             System.out.print((char) singleByte + " [" + singleByte + "]");
             byteData >>= 8;
@@ -170,20 +173,20 @@ public class BinaryInputStream extends I
         long total = 0;
         while (length != total) {
             long skipped = is.skip(length - total);
-            if (skipped < 1)
+            if (skipped < 1) {
                 throw new IOException(exception + " (" + skipped + ")");
+            }
             total += skipped;
         }
     }
 
     protected final void scanForByte(byte value) throws IOException {
         int count = 0;
-        for (int i = 0; count < 3; i++)
-        // while(count<3)
-        {
+        for (int i = 0; count < 3; i++) {
             int b = is.read();
-            if (b < 0)
+            if (b < 0) {
                 return;
+            }
             if ((0xff & b) == value) {
                 System.out.println("\t" + i + ": match.");
                 count++;
@@ -200,8 +203,9 @@ public class BinaryInputStream extends I
             throw new IOException(exception);
         }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result);
+        }
 
         return (byte) (0xff & result);
     }
@@ -252,28 +256,23 @@ public class BinaryInputStream extends I
         byte byte1 = bytes[start + 1];
         byte byte2 = bytes[start + 2];
         byte byte3 = 0;
-        if (length == 4)
+        if (length == 4) {
             byte3 = bytes[start + 3];
-
-        // return convert4BytesToInt(name, byte0, byte1, byte2, byte3,
-        // byteOrder);
+        }
 
         int result;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result = ((0xff & byte0) << 24) + ((0xff & byte1) << 16)
                     + ((0xff & byte2) << 8) + ((0xff & byte3) << 0);
-        // result = (( byte0) << 24) + ((byte1) << 16)
-        // + (( byte2) << 8) + (( byte3) << 0);
-        else
-            // intel, little endian
+        } else {
             result = ((0xff & byte3) << 24) + ((0xff & byte2) << 16)
                     + ((0xff & byte1) << 8) + ((0xff & byte0) << 0);
-        // result = (( byte3) << 24) + (( byte2) << 16)
-        // + (( byte1) << 8) + (( byte0) << 0);
+        }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result, 4);
+        }
 
         return result;
     }
@@ -308,18 +307,17 @@ public class BinaryInputStream extends I
         byte byte0 = bytes[start + 0];
         byte byte1 = bytes[start + 1];
 
-        // return convert2BytesToShort(name, byte0, byte1, byteOrder);
-
         int result;
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             result = ((0xff & byte0) << 8) + ((0xff & byte1) << 0);
-        else
-            // intel, little endian
+        } else {
             result = ((0xff & byte1) << 8) + ((0xff & byte0) << 0);
+        }
 
-        if (debug)
+        if (debug) {
             debugNumber(name, result, 2);
+        }
 
         return result;
     }
@@ -355,8 +353,9 @@ public class BinaryInputStream extends I
         int read = 0;
         while (read < length) {
             int count = is.read(result, read, length - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -387,14 +386,16 @@ public class BinaryInputStream extends I
 
     public final byte[] readBytearray(String name, byte bytes[], int start,
             int count) {
-        if (bytes.length < (start + count))
+        if (bytes.length < (start + count)) {
             return null;
+        }
 
         byte result[] = new byte[count];
         System.arraycopy(bytes, start, result, 0, count);
 
-        if (debug)
+        if (debug) {
             debugByteArray(name, result);
+        }
 
         return result;
     }
@@ -412,13 +413,15 @@ public class BinaryInputStream extends I
         byte bytes[] = new byte[length];
         int total = 0;
         int read;
-        while ((read = read(bytes, total, length - total)) > 0)
+        while ((read = read(bytes, total, length - total)) > 0) {
             total += read;
+        }
         if (total < length) {
-            if (strict)
+            if (strict) {
                 throw new ImageReadException(error);
-            else if (verbose)
+            } else if (verbose) {
                 System.out.println(error);
+            }
             return null;
         }
         return bytes;
@@ -434,10 +437,12 @@ public class BinaryInputStream extends I
 
     public final boolean compareByteArrays(byte a[], int aStart, byte b[],
             int bStart, int length) {
-        if (a.length < (aStart + length))
+        if (a.length < (aStart + length)) {
             return false;
-        if (b.length < (bStart + length))
+        }
+        if (b.length < (bStart + length)) {
             return false;
+        }
 
         for (int i = 0; i < length; i++) {
             if (a[aStart + i] != b[bStart + i]) {
@@ -459,8 +464,9 @@ public class BinaryInputStream extends I
         int read = 0;
         while (read < size) {
             int count = is.read(bytes, read, size - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -476,8 +482,9 @@ public class BinaryInputStream extends I
         int read = 0;
         while (read < size) {
             int count = is.read(bytes, read, size - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -494,8 +501,9 @@ public class BinaryInputStream extends I
         int read = 0;
         while (read < size) {
             int count = is.read(bytes, read, size - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }
@@ -506,8 +514,9 @@ public class BinaryInputStream extends I
     public final int read1ByteInteger(String exception)
             throws ImageReadException, IOException {
         int byte0 = is.read();
-        if (byte0 < 0)
+        if (byte0 < 0) {
             throw new ImageReadException(exception);
+        }
 
         return 0xff & byte0;
     }
@@ -516,14 +525,15 @@ public class BinaryInputStream extends I
             throws ImageReadException, IOException {
         int byte0 = is.read();
         int byte1 = is.read();
-        if (byte0 < 0 || byte1 < 0)
+        if (byte0 < 0 || byte1 < 0) {
             throw new ImageReadException(exception);
+        }
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             return ((0xff & byte0) << 8) + ((0xff & byte1) << 0);
-        else
-            // intel, little endian
+        } else {
             return ((0xff & byte1) << 8) + ((0xff & byte0) << 0);
+        }
     }
 
     public final int read4ByteInteger(String exception)
@@ -532,23 +542,23 @@ public class BinaryInputStream extends I
         int byte1 = is.read();
         int byte2 = is.read();
         int byte3 = is.read();
-        if (byte0 < 0 || byte1 < 0 || byte2 < 0 || byte3 < 0)
+        if (byte0 < 0 || byte1 < 0 || byte2 < 0 || byte3 < 0) {
             throw new ImageReadException(exception);
+        }
 
-        if (byteOrder == BYTE_ORDER_MOTOROLA) // motorola, big endian
+        if (byteOrder == BYTE_ORDER_MOTOROLA) {
             return ((0xff & byte0) << 24) + ((0xff & byte1) << 16)
                     + ((0xff & byte2) << 8) + ((0xff & byte3) << 0);
-        else
-            // intel, little endian
+        } else {
             return ((0xff & byte3) << 24) + ((0xff & byte2) << 16)
                     + ((0xff & byte1) << 8) + ((0xff & byte0) << 0);
+        }
     }
 
     protected final void printCharQuad(String msg, int i) {
         System.out.println(msg + ": '" + (char) (0xff & (i >> 24))
                 + (char) (0xff & (i >> 16)) + (char) (0xff & (i >> 8))
                 + (char) (0xff & (i >> 0)) + "'");
-
     }
 
     protected final void printByteBits(String msg, byte i) {
@@ -565,9 +575,9 @@ public class BinaryInputStream extends I
 
     public final int findNull(byte src[], int start) {
         for (int i = start; i < src.length; i++) {
-            if (src[i] == 0)
+            if (src[i] == 0) {
                 return i;
-
+            }
         }
         return -1;
     }
@@ -586,8 +596,9 @@ public class BinaryInputStream extends I
         int read = 0;
         while (read < length) {
             int count = raf.read(result, read, length - read);
-            if (count < 1)
+            if (count < 1) {
                 throw new IOException(exception);
+            }
 
             read += count;
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java Thu Sep 27 04:35:39 2012
@@ -48,16 +48,18 @@ public class BinaryOutputStream extends 
     private int byteOrder = BYTE_ORDER_NETWORK;
 
     protected void setByteOrder(int a, int b) throws ImageWriteException {
-        if (a != b)
+        if (a != b) {
             throw new ImageWriteException("Byte Order bytes don't match (" + a
                     + ", " + b + ").");
+        }
 
-        if (a == BYTE_ORDER_MOTOROLA)
+        if (a == BYTE_ORDER_MOTOROLA) {
             byteOrder = a;
-        else if (a == BYTE_ORDER_INTEL)
+        } else if (a == BYTE_ORDER_INTEL) {
             byteOrder = a;
-        else
+        } else {
             throw new ImageWriteException("Unknown Byte Order hint: " + a);
+        }
     }
 
     protected void setByteOrder(int byteOrder) {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStream.java Thu Sep 27 04:35:39 2012
@@ -27,13 +27,13 @@ public class BitInputStream extends Inpu
     public BitInputStream(InputStream is, int byteOrder) {
         this.is = is;
         this.byteOrder = byteOrder;
-        // super(is);
     }
 
     @Override
     public int read() throws IOException {
-        if (cacheBitsRemaining > 0)
+        if (cacheBitsRemaining > 0) {
             throw new IOException("BitInputStream: incomplete bit read");
+        }
         return is.read();
     }
 
@@ -49,9 +49,10 @@ public class BitInputStream extends Inpu
                 cacheBitsRemaining = 8;
                 bytes_read++;
             }
-            if (count > cacheBitsRemaining)
+            if (count > cacheBitsRemaining) {
                 throw new IOException(
                         "BitInputStream: can't read bit fields across bytes");
+            }
 
             // int bits_to_shift = cache_bits_remaining - count;
             cacheBitsRemaining -= count;
@@ -75,8 +76,9 @@ public class BitInputStream extends Inpu
             }
 
         }
-        if (cacheBitsRemaining > 0)
+        if (cacheBitsRemaining > 0) {
             throw new IOException("BitInputStream: incomplete bit read");
+        }
 
         if (count == 8) {
             bytes_read++;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStreamFlexible.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStreamFlexible.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStreamFlexible.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BitInputStreamFlexible.java Thu Sep 27 04:35:39 2012
@@ -32,8 +32,9 @@ public class BitInputStreamFlexible exte
 
     @Override
     public int read() throws IOException {
-        if (cacheBitsRemaining > 0)
+        if (cacheBitsRemaining > 0) {
             throw new IOException("BitInputStream: incomplete bit read");
+        }
         return is.read();
     }
 
@@ -43,8 +44,8 @@ public class BitInputStreamFlexible exte
 
     public final int readBits(int count) throws IOException {
 
-        if (count <= 32) // catch-all
-        {
+        if (count <= 32)  {
+            // catch-all
             int result = 0;
             // int done = 0;
 
@@ -62,8 +63,9 @@ public class BitInputStreamFlexible exte
             }
             while (count >= 8) {
                 cache = is.read();
-                if (cache < 0)
+                if (cache < 0) {
                     throw new IOException("couldn't read bits");
+                }
                 // System.out.println("cache 1: " + cache + " ("
                 // + Integer.toHexString(cache) + ", "
                 // + Integer.toBinaryString(cache) + ")");
@@ -73,8 +75,9 @@ public class BitInputStreamFlexible exte
             }
             if (count > 0) {
                 cache = is.read();
-                if (cache < 0)
+                if (cache < 0) {
                     throw new IOException("couldn't read bits");
+                }
                 // System.out.println("cache 2: " + cache + " ("
                 // + Integer.toHexString(cache) + ", "
                 // + Integer.toBinaryString(cache) + ")");

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageMetadata.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageMetadata.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageMetadata.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/ImageMetadata.java Thu Sep 27 04:35:39 2012
@@ -43,13 +43,15 @@ public class ImageMetadata implements II
     }
 
     public String toString(String prefix) {
-        if (null == prefix)
+        if (null == prefix) {
             prefix = "";
+        }
 
         StringBuilder result = new StringBuilder();
         for (int i = 0; i < items.size(); i++) {
-            if (i > 0)
+            if (i > 0) {
                 result.append(newline);
+            }
             // if (null != prefix)
             // result.append(prefix);
 
@@ -86,8 +88,9 @@ public class ImageMetadata implements II
 
         public String toString(String prefix) {
             String result = keyword + ": " + text;
-            if (null != prefix)
+            if (null != prefix) {
                 result = prefix + result;
+            }
             return result;
         }
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/MyByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/MyByteArrayOutputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/MyByteArrayOutputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/MyByteArrayOutputStream.java Thu Sep 27 04:35:39 2012
@@ -31,9 +31,10 @@ public class MyByteArrayOutputStream ext
 
     @Override
     public void write(int value) throws IOException {
-        if (count >= bytes.length)
+        if (count >= bytes.length) {
             throw new IOException("Write exceeded expected length (" + count
                     + ", " + bytes.length + ")");
+        }
 
         bytes[count] = (byte) value;
         count++;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/PackBits.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/PackBits.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/PackBits.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/PackBits.java Thu Sep 27 04:35:39 2012
@@ -31,44 +31,40 @@ public class PackBits {
 
         // Loop until you get the number of unpacked bytes you are expecting:
         int i = 0;
-        while (total < expected)
-
-        {
+        while (total < expected) {
             // Read the next source byte into n.
-            if (i >= bytes.length)
+            if (i >= bytes.length) {
                 throw new ImageReadException(
                         "Tiff: Unpack bits source exhausted: " + i
                                 + ", done + " + total + ", expected + "
                                 + expected);
+            }
 
             int n = bytes[i++];
-            // If n is between 0 and 127 inclusive, copy the next n+1 bytes
-            // literally.
             if ((n >= 0) && (n <= 127)) {
-
+                // If n is between 0 and 127 inclusive, copy the next n+1 bytes
+                // literally.
                 int count = n + 1;
 
                 total += count;
-                for (int j = 0; j < count; j++)
+                for (int j = 0; j < count; j++) {
                     baos.write(bytes[i++]);
-            }
-            // Else if n is between -127 and -1 inclusive, copy the next byte
-            // -n+1
-            // times.
-            else if ((n >= -127) && (n <= -1)) {
+                }
+            } else if ((n >= -127) && (n <= -1)) {
+                // Else if n is between -127 and -1 inclusive, copy the next byte
+                // -n+1 times.
+
                 int b = bytes[i++];
                 int count = -n + 1;
 
                 total += count;
-                for (int j = 0; j < count; j++)
+                for (int j = 0; j < count; j++) {
                     baos.write(b);
-            } else if (n == -128)
+                }
+            } else if (n == -128) {
+                // Else if n is -128, noop.
                 throw new ImageReadException("Packbits: " + n);
-            // Else if n is between -127 and -1 inclusive, copy the next byte
-            // -n+1
-            // times.
-            // else
-            // Else if n is -128, noop.
+            }
         }
         byte result[] = baos.toByteArray();
 
@@ -78,16 +74,18 @@ public class PackBits {
 
     private int findNextDuplicate(byte bytes[], int start) {
         // int last = -1;
-        if (start >= bytes.length)
+        if (start >= bytes.length) {
             return -1;
+        }
 
         byte prev = bytes[start];
 
         for (int i = start + 1; i < bytes.length; i++) {
             byte b = bytes[i];
 
-            if (b == prev)
+            if (b == prev) {
                 return i - 1;
+            }
 
             prev = b;
         }
@@ -100,10 +98,8 @@ public class PackBits {
 
         int i;
 
-        for (i = start + 1; (i < bytes.length) && (bytes[i] == b); i++) { /*
-                                                                           * do
-                                                                           * nothing
-                                                                           */
+        for (i = start + 1; (i < bytes.length) && (bytes[i] == b); i++) {
+            // do nothing
         }
 
         return i - start;
@@ -119,32 +115,34 @@ public class PackBits {
             while (ptr < bytes.length) {
                 int dup = findNextDuplicate(bytes, ptr);
     
-                if (dup == ptr) // write run length
-                {
+                if (dup == ptr) {
+                    // write run length
                     int len = findRunLength(bytes, dup);
                     int actual_len = Math.min(len, 128);
                     baos.write(-(actual_len - 1));
                     baos.write(bytes[ptr]);
                     ptr += actual_len;
-                } else { // write literals
+                } else {
+                    // write literals
                     int len = dup - ptr;
     
                     if (dup > 0) {
                         int runlen = findRunLength(bytes, dup);
-                        if (runlen < 3) // may want to discard next run.
-                        {
+                        if (runlen < 3) {
+                            // may want to discard next run.
                             int nextptr = ptr + len + runlen;
                             int nextdup = findNextDuplicate(bytes, nextptr);
-                            if (nextdup != nextptr) // discard 2-byte run
-                            {
+                            if (nextdup != nextptr) {
+                                // discard 2-byte run
                                 dup = nextdup;
                                 len = dup - ptr;
                             }
                         }
                     }
     
-                    if (dup < 0)
+                    if (dup < 0) {
                         len = bytes.length - ptr;
+                    }
                     int actual_len = Math.min(len, 128);
     
                     baos.write(actual_len - 1);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumber.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumber.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumber.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumber.java Thu Sep 27 04:35:39 2012
@@ -45,9 +45,10 @@ public class RationalNumber extends Numb
                 d >>= 1;
             }
 
-            if (d == 0)
+            if (d == 0) {
                 throw new NumberFormatException("Invalid value, numerator: "
                         + n + ", divisor: " + d);
+            }
         }
 
         long gcd = gcd(n, d);
@@ -62,10 +63,11 @@ public class RationalNumber extends Numb
      */
     private static long gcd(long a, long b) {
 
-        if (b == 0)
+        if (b == 0) {
             return a;
-        else
+        } else {
             return gcd(b, a % b);
+        }
     }
 
     public RationalNumber negate() {
@@ -100,17 +102,20 @@ public class RationalNumber extends Numb
 
     @Override
     public String toString() {
-        if (divisor == 0)
+        if (divisor == 0) {
             return "Invalid rational (" + numerator + "/" + divisor + ")";
-        if ((numerator % divisor) == 0)
+        }
+        if ((numerator % divisor) == 0) {
             return nf.format(numerator / divisor);
+        }
         return numerator + "/" + divisor + " ("
                 + nf.format((double) numerator / divisor) + ")";
     }
 
     public String toDisplayString() {
-        if ((numerator % divisor) == 0)
+        if ((numerator % divisor) == 0) {
             return "" + (numerator / divisor);
+        }
         NumberFormat nf = DecimalFormat.getInstance();
         nf.setMaximumFractionDigits(3);
         return nf.format((double) numerator / (double) divisor);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java Thu Sep 27 04:35:39 2012
@@ -46,10 +46,11 @@ public abstract class RationalNumberUtil
     // calculate rational number using successive approximations.
     //
     public static final RationalNumber getRationalNumber(double value) {
-        if (value >= Integer.MAX_VALUE)
+        if (value >= Integer.MAX_VALUE) {
             return new RationalNumber(Integer.MAX_VALUE, 1);
-        else if (value <= -Integer.MAX_VALUE)
+        } else if (value <= -Integer.MAX_VALUE) {
             return new RationalNumber(-Integer.MAX_VALUE, 1);
+        }
 
         boolean negative = false;
         if (value < 0) {
@@ -59,33 +60,31 @@ public abstract class RationalNumberUtil
 
         Option low;
         Option high;
-        {
-            RationalNumber l, h;
+        RationalNumber l, h;
 
-            if (value == 0)
-                return new RationalNumber(0, 1);
-            else if (value >= 1) {
-                int approx = (int) value;
-                if (approx < value) {
-                    l = new RationalNumber(approx, 1);
-                    h = new RationalNumber(approx + 1, 1);
-                } else {
-                    l = new RationalNumber(approx - 1, 1);
-                    h = new RationalNumber(approx, 1);
-                }
+        if (value == 0) {
+            return new RationalNumber(0, 1);
+        } else if (value >= 1) {
+            int approx = (int) value;
+            if (approx < value) {
+                l = new RationalNumber(approx, 1);
+                h = new RationalNumber(approx + 1, 1);
             } else {
-                int approx = (int) (1.0 / value);
-                if ((1.0 / approx) < value) {
-                    l = new RationalNumber(1, approx);
-                    h = new RationalNumber(1, approx - 1);
-                } else {
-                    l = new RationalNumber(1, approx + 1);
-                    h = new RationalNumber(1, approx);
-                }
+                l = new RationalNumber(approx - 1, 1);
+                h = new RationalNumber(approx, 1);
+            }
+        } else {
+            int approx = (int) (1.0 / value);
+            if ((1.0 / approx) < value) {
+                l = new RationalNumber(1, approx);
+                h = new RationalNumber(1, approx - 1);
+            } else {
+                l = new RationalNumber(1, approx + 1);
+                h = new RationalNumber(1, approx);
             }
-            low = Option.factory(l, value);
-            high = Option.factory(h, value);
         }
+        low = Option.factory(l, value);
+        high = Option.factory(h, value);
 
         Option bestOption = (low.error < high.error) ? low : high;
 
@@ -105,19 +104,22 @@ public abstract class RationalNumberUtil
             Option mediantOption = Option.factory(mediant, value);
 
             if (value < mediant.doubleValue()) {
-                if (high.error <= mediantOption.error)
+                if (high.error <= mediantOption.error) {
                     break;
+                }
 
                 high = mediantOption;
             } else {
-                if (low.error <= mediantOption.error)
+                if (low.error <= mediantOption.error) {
                     break;
+                }
 
                 low = mediantOption;
             }
 
-            if (mediantOption.error < bestOption.error)
+            if (mediantOption.error < bestOption.error) {
                 bestOption = mediantOption;
+            }
         }
 
         return negative ? bestOption.rationalNumber.negate()

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RgbBufferedImageFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RgbBufferedImageFactory.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RgbBufferedImageFactory.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RgbBufferedImageFactory.java Thu Sep 27 04:35:39 2012
@@ -22,8 +22,9 @@ import java.awt.image.BufferedImage;
 public class RgbBufferedImageFactory implements IBufferedImageFactory {
     public BufferedImage getColorBufferedImage(int width, int height,
             boolean hasAlpha) {
-        if (hasAlpha)
+        if (hasAlpha) {
             return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+        }
         return new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/SimpleBufferedImageFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/SimpleBufferedImageFactory.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/SimpleBufferedImageFactory.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/SimpleBufferedImageFactory.java Thu Sep 27 04:35:39 2012
@@ -22,15 +22,17 @@ import java.awt.image.BufferedImage;
 public class SimpleBufferedImageFactory implements IBufferedImageFactory {
     public BufferedImage getColorBufferedImage(int width, int height,
             boolean hasAlpha) {
-        if (hasAlpha)
+        if (hasAlpha) {
             return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+        }
         return new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
     }
 
     public BufferedImage getGrayscaleBufferedImage(int width, int height,
             boolean hasAlpha) {
-        if (hasAlpha)
+        if (hasAlpha) {
             return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+        }
 
         return new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java Thu Sep 27 04:35:39 2012
@@ -93,8 +93,9 @@ public class ByteSourceFile extends Byte
             return baos.toByteArray();
         } finally {
             try {
-                if (null != is)
+                if (null != is) {
                     is.close();
+                }
             } catch (IOException e) {
                 Debug.debug(e);
             }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java Thu Sep 27 04:35:39 2012
@@ -41,10 +41,12 @@ public class ByteSourceInputStream exten
         }
 
         public CacheBlock getNext() throws IOException {
-            if (null != next)
+            if (null != next) {
                 return next;
-            if (triedNext)
+            }
+            if (triedNext) {
                 return null;
+            }
             triedNext = true;
             next = readBlock();
             return next;
@@ -55,13 +57,14 @@ public class ByteSourceInputStream exten
     private byte readBuffer[] = null;
 
     private CacheBlock readBlock() throws IOException {
-        if (null == readBuffer)
+        if (null == readBuffer) {
             readBuffer = new byte[BLOCK_SIZE];
+        }
 
         int read = is.read(readBuffer);
-        if (read < 1)
+        if (read < 1) {
             return null;
-        else if (read < BLOCK_SIZE) {
+        } else if (read < BLOCK_SIZE) {
             // return a copy.
             byte result[] = new byte[read];
             System.arraycopy(readBuffer, 0, result, 0, read);
@@ -75,8 +78,9 @@ public class ByteSourceInputStream exten
     }
 
     private CacheBlock getFirstBlock() throws IOException {
-        if (null == cacheHead)
+        if (null == cacheHead) {
             cacheHead = readBlock();
+        }
         return cacheHead;
     }
 
@@ -88,8 +92,9 @@ public class ByteSourceInputStream exten
         @Override
         public int read() throws IOException {
             if (null == block) {
-                if (readFirst)
+                if (readFirst) {
                     return -1;
+                }
                 block = getFirstBlock();
                 readFirst = true;
             }
@@ -99,11 +104,13 @@ public class ByteSourceInputStream exten
                 blockIndex = 0;
             }
 
-            if (null == block)
+            if (null == block) {
                 return -1;
+            }
 
-            if (blockIndex >= block.bytes.length)
+            if (blockIndex >= block.bytes.length) {
                 return -1;
+            }
 
             return 0xff & block.bytes[blockIndex++];
         }
@@ -111,19 +118,21 @@ public class ByteSourceInputStream exten
         @Override
         public int read(byte b[], int off, int len) throws IOException {
             // first section copied verbatim from InputStream
-            if (b == null)
+            if (b == null) {
                 throw new NullPointerException();
-            else if ((off < 0) || (off > b.length) || (len < 0)
-                    || ((off + len) > b.length) || ((off + len) < 0))
+            } else if ((off < 0) || (off > b.length) || (len < 0)
+                    || ((off + len) > b.length) || ((off + len) < 0)) {
                 throw new IndexOutOfBoundsException();
-            else if (len == 0)
+            } else if (len == 0) {
                 return 0;
+            }
 
             // optimized block read
 
             if (null == block) {
-                if (readFirst)
+                if (readFirst) {
                     return -1;
+                }
                 block = getFirstBlock();
                 readFirst = true;
             }
@@ -133,11 +142,13 @@ public class ByteSourceInputStream exten
                 blockIndex = 0;
             }
 
-            if (null == block)
+            if (null == block) {
                 return -1;
+            }
 
-            if (blockIndex >= block.bytes.length)
+            if (blockIndex >= block.bytes.length) {
                 return -1;
+            }
 
             int readSize = Math.min(len, block.bytes.length - blockIndex);
             System.arraycopy(block.bytes, blockIndex, b, off, readSize);
@@ -170,11 +181,13 @@ public class ByteSourceInputStream exten
         int total = 0;
         while (true) {
             int read = is.read(bytes, total, bytes.length - total);
-            if (read < 1)
+            if (read < 1) {
                 throw new IOException("Could not read block.");
+            }
             total += read;
-            if (total >= blockLength)
+            if (total >= blockLength) {
                 return bytes;
+            }
         }
     }
 
@@ -182,14 +195,16 @@ public class ByteSourceInputStream exten
 
     @Override
     public long getLength() throws IOException {
-        if (streamLength != null)
+        if (streamLength != null) {
             return streamLength.longValue();
+        }
 
         InputStream is = getInputStream();
         long result = 0;
         long skipped;
-        while ((skipped = is.skip(1024)) > 0)
+        while ((skipped = is.skip(1024)) > 0) {
             result += skipped;
+        }
         streamLength = result;
         return result;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/BitsToByteInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/BitsToByteInputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/BitsToByteInputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/BitsToByteInputStream.java Thu Sep 27 04:35:39 2012
@@ -35,10 +35,11 @@ public class BitsToByteInputStream exten
 
     public int readBits(int bitCount) throws IOException {
         int i = is.readBits(bitCount);
-        if (bitCount < desiredDepth)
+        if (bitCount < desiredDepth) {
             i <<= (desiredDepth - bitCount);
-        else if (bitCount > desiredDepth)
+        } else if (bitCount > desiredDepth) {
             i >>= (bitCount - desiredDepth);
+        }
 
         return i;
     }
@@ -46,8 +47,9 @@ public class BitsToByteInputStream exten
     public int[] readBitsArray(int sampleBits, int length) throws IOException {
         int result[] = new int[length];
 
-        for (int i = 0; i < length; i++)
+        for (int i = 0; i < length; i++) {
             result[i] = readBits(sampleBits);
+        }
 
         return result;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java Thu Sep 27 04:35:39 2012
@@ -58,12 +58,13 @@ public class MyBitInputStream extends In
 
             int newByte = (0xff & next);
 
-            if (byteOrder == BYTE_ORDER_NETWORK) // MSB, so add to right
+            if (byteOrder == BYTE_ORDER_NETWORK) {
                 bitCache = (bitCache << 8) | newByte;
-            else if (byteOrder == BYTE_ORDER_INTEL) // LSB, so add to left
+            } else if (byteOrder == BYTE_ORDER_INTEL) {
                 bitCache = (newByte << bitsInCache) | bitCache;
-            else
+            } else {
                 throw new IOException("Unknown byte order: " + byteOrder);
+            }
 
             bytesRead++;
             bitsInCache += 8;
@@ -72,15 +73,14 @@ public class MyBitInputStream extends In
 
         int sample;
 
-        if (byteOrder == BYTE_ORDER_NETWORK) // MSB, so read from left
-        {
+        if (byteOrder == BYTE_ORDER_NETWORK) {
             sample = sampleMask & (bitCache >> (bitsInCache - SampleBits));
-        } else if (byteOrder == BYTE_ORDER_INTEL) // LSB, so read from right
-        {
+        } else if (byteOrder == BYTE_ORDER_INTEL) {
             sample = sampleMask & bitCache;
             bitCache >>= SampleBits;
-        } else
+        } else {
             throw new IOException("Unknown byte order: " + byteOrder);
+        }
 
         int result = sample;
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java Thu Sep 27 04:35:39 2012
@@ -44,26 +44,26 @@ public class MyBitOutputStream extends O
         int sampleMask = (1 << SampleBits) - 1;
         value &= sampleMask;
 
-        if (byteOrder == BYTE_ORDER_NETWORK) // MSB, so add to right
-        {
+        if (byteOrder == BYTE_ORDER_NETWORK) {
+            // MSB, so add to right
             bitCache = (bitCache << SampleBits) | value;
-        } else if (byteOrder == BYTE_ORDER_INTEL) // LSB, so add to left
-        {
+        } else if (byteOrder == BYTE_ORDER_INTEL) {
+            // LSB, so add to left
             bitCache = bitCache | (value << bitsInCache);
-        } else
+        } else {
             throw new IOException("Unknown byte order: " + byteOrder);
+        }
         bitsInCache += SampleBits;
 
         while (bitsInCache >= 8) {
-            if (byteOrder == BYTE_ORDER_NETWORK) // MSB, so write from left
-            {
+            if (byteOrder == BYTE_ORDER_NETWORK) {
+                // MSB, so write from left
                 int b = 0xff & (bitCache >> (bitsInCache - 8));
                 actualWrite(b);
 
                 bitsInCache -= 8;
-            } else if (byteOrder == BYTE_ORDER_INTEL) // LSB, so write from
-                                                      // right
-            {
+            } else if (byteOrder == BYTE_ORDER_INTEL) {
+                // LSB, so write from right
                 int b = 0xff & bitCache;
                 actualWrite(b);
 
@@ -88,13 +88,12 @@ public class MyBitOutputStream extends O
             int bitMask = (1 << bitsInCache) - 1;
             int b = bitMask & bitCache;
 
-            if (byteOrder == BYTE_ORDER_NETWORK) // MSB, so write from left
-            {
+            if (byteOrder == BYTE_ORDER_NETWORK) { 
+                // MSB, so write from left
                 b <<= 8 - bitsInCache; // left align fragment.
                 os.write(b);
-            } else if (byteOrder == BYTE_ORDER_INTEL) // LSB, so write from
-                                                      // right
-            {
+            } else if (byteOrder == BYTE_ORDER_INTEL) {
+                // LSB, so write from right
                 os.write(b);
             }
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java Thu Sep 27 04:35:39 2012
@@ -51,8 +51,9 @@ public class MyLzwCompressor {
         clearCode = 1 << initialCodeSize;
         eoiCode = clearCode + 1;
 
-        if (null != listener)
+        if (null != listener) {
             listener.init(clearCode, eoiCode);
+        }
 
         InitializeStringTable();
     }
@@ -80,8 +81,9 @@ public class MyLzwCompressor {
     }
 
     private final void incrementCodeSize() {
-        if (codeSize != 12)
+        if (codeSize != 12) {
             codeSize++;
+        }
     }
 
     private final Object arrayToKey(byte b) {
@@ -122,14 +124,17 @@ public class MyLzwCompressor {
         public boolean equals(Object o) {
             if (o instanceof ByteArray) {
                 ByteArray other = (ByteArray) o;
-                if (other.hash != hash)
+                if (other.hash != hash) {
                     return false;
-                if (other.length != length)
+                }
+                if (other.length != length) {
                     return false;
+                }
 
                 for (int i = 0; i < length; i++) {
-                    if (other.bytes[i + other.start] != bytes[i + start])
+                    if (other.bytes[i + other.start] != bytes[i + start]) {
                         return false;
+                    }
                 }
 
                 return true;
@@ -144,20 +149,23 @@ public class MyLzwCompressor {
 
     private final void writeDataCode(MyBitOutputStream bos, int code)
             throws IOException {
-        if (null != listener)
+        if (null != listener) {
             listener.dataCode(code);
+        }
         writeCode(bos, code);
     }
 
     private final void writeClearCode(MyBitOutputStream bos) throws IOException {
-        if (null != listener)
+        if (null != listener) {
             listener.dataCode(clearCode);
+        }
         writeCode(bos, clearCode);
     }
 
     private final void writeEoiCode(MyBitOutputStream bos) throws IOException {
-        if (null != listener)
+        if (null != listener) {
             listener.eoiCode(eoiCode);
+        }
         writeCode(bos, eoiCode);
     }
 
@@ -176,8 +184,9 @@ public class MyLzwCompressor {
             throws IOException {
         Object key = arrayToKey(bytes, start, length);
         Object o = map.get(key);
-        if (o == null)
+        if (o == null) {
             throw new IOException("CodeFromString");
+        }
         return ((Integer) o).intValue();
     }
 
@@ -191,19 +200,18 @@ public class MyLzwCompressor {
             throws IOException {
         boolean cleared = false;
 
-        {
-            int limit = (1 << codeSize);
-            if (earlyLimit)
-                limit--;
-
-            if (codes == limit) {
-                if (codeSize < 12)
-                    incrementCodeSize();
-                else {
-                    writeClearCode(bos);
-                    clearTable();
-                    cleared = true;
-                }
+        int limit = (1 << codeSize);
+        if (earlyLimit) {
+            limit--;
+        }
+
+        if (codes == limit) {
+            if (codeSize < 12) {
+                incrementCodeSize();
+            } else {
+                writeClearCode(bos);
+                clearTable();
+                cleared = true;
             }
         }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java?rev=1390837&r1=1390836&r2=1390837&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java Thu Sep 27 04:35:39 2012
@@ -54,8 +54,9 @@ public final class MyLzwDecompressor {
         clearCode = 1 << initialCodeSize;
         eoiCode = clearCode + 1;
 
-        if (null != listener)
+        if (null != listener) {
             listener.init(clearCode, eoiCode);
+        }
 
         InitializeTable();
     }
@@ -65,8 +66,9 @@ public final class MyLzwDecompressor {
 
         int intial_entries_count = 1 << codeSize + 2;
 
-        for (int i = 0; i < intial_entries_count; i++)
+        for (int i = 0; i < intial_entries_count; i++) {
             table[i] = new byte[] { (byte) i, };
+        }
     }
 
     private void clearTable() {
@@ -81,16 +83,17 @@ public final class MyLzwDecompressor {
     private int getNextCode(MyBitInputStream is) throws IOException {
         int code = is.readBits(codeSize);
 
-        if (null != listener)
+        if (null != listener) {
             listener.code(code);
+        }
         return code;
     }
 
     private byte[] stringFromCode(int code) throws IOException {
-        if ((code >= codes) || (code < 0))
+        if ((code >= codes) || (code < 0)) {
             throw new IOException("Bad Code: " + code + " codes: " + codes
                     + " code_size: " + codeSize + ", table: " + table.length);
-
+        }
         return table[code];
     }
 
@@ -106,10 +109,10 @@ public final class MyLzwDecompressor {
         if (codes < (1 << codeSize)) {
             table[codes] = bytes;
             codes++;
-        } else
+        } else {
             throw new IOException("AddStringToTable: codes: " + codes
                     + " code_size: " + codeSize);
-
+        }
         checkCodeSize();
     }
 
@@ -139,8 +142,9 @@ public final class MyLzwDecompressor {
             throws IOException {
         int code, oldCode = -1;
         MyBitInputStream mbis = new MyBitInputStream(is, byteOrder);
-        if (tiffLZWMode)
+        if (tiffLZWMode) {
             mbis.setTiffLZWMode();
+        }
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream(expectedLength);
 
@@ -150,8 +154,9 @@ public final class MyLzwDecompressor {
             if (code == clearCode) {
                 clearTable();
 
-                if (written >= expectedLength)
+                if (written >= expectedLength) {
                     break;
+                }
                 code = getNextCode(mbis);
 
                 if (code == eoiCode) {
@@ -177,8 +182,9 @@ public final class MyLzwDecompressor {
                 }
             } // end of not-ClearCode case
 
-            if (written >= expectedLength)
+            if (written >= expectedLength) {
                 break;
+            }
         } // end of while loop
 
         byte result[] = baos.toByteArray();
@@ -186,19 +192,20 @@ public final class MyLzwDecompressor {
         return result;
     }
 
-    private void checkCodeSize() // throws IOException
-    {
+    private void checkCodeSize() {
         int limit = (1 << codeSize);
-        if (tiffLZWMode)
+        if (tiffLZWMode) {
             limit--;
+        }
 
-        if (codes == limit)
+        if (codes == limit) {
             incrementCodeSize();
+        }
     }
 
-    private void incrementCodeSize() // throws IOException
-    {
-        if (codeSize != 12)
+    private void incrementCodeSize() {
+        if (codeSize != 12) {
             codeSize++;
+        }
     }
 }



Mime
View raw message