commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1342971 [20/20] - in /commons/proper/imaging/trunk/src: main/java/org/apache/commons/imaging/formats/bmp/ main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/ main/java/org/apache/commons/imaging/formats/bmp/writers/ main/java/or...
Date Sat, 26 May 2012 21:19:22 GMT
Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java Sat May 26 21:19:03 2012
@@ -31,15 +31,13 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.ImagingTest;
 import org.apache.commons.imaging.util.IoUtils;
 
-public class PngWriteReadTest extends ImagingTest
-{
-    //    public PngWriteReadTest(String name)
-    //    {
-    //        super(name);
-    //    }
+public class PngWriteReadTest extends ImagingTest {
+    // public PngWriteReadTest(String name)
+    // {
+    // super(name);
+    // }
 
-    private int[][] getSimpleRawData(int width, int height, int value)
-    {
+    private int[][] getSimpleRawData(int width, int height, int value) {
         int[][] result = new int[height][width];
         for (int y = 0; y < height; y++)
             for (int x = 0; x < width; x++)
@@ -47,12 +45,10 @@ public class PngWriteReadTest extends Im
         return result;
     }
 
-    private int[][] getAscendingRawData(int width, int height)
-    {
+    private int[][] getAscendingRawData(int width, int height) {
         int[][] result = new int[height][width];
         for (int y = 0; y < height; y++)
-            for (int x = 0; x < width; x++)
-            {
+            for (int x = 0; x < width; x++) {
                 int alpha = (x + y) % 256;
                 int value = (x + y) % 256;
                 int argb = (0xff & alpha) << 24 | (0xff & value) << 16
@@ -63,21 +59,18 @@ public class PngWriteReadTest extends Im
         return result;
     }
 
-    private int[][] randomRawData(int width, int height)
-    {
+    private int[][] randomRawData(int width, int height) {
         Random random = new Random();
         int[][] result = new int[height][width];
         for (int y = 0; y < height; y++)
-            for (int x = 0; x < width; x++)
-            {
+            for (int x = 0; x < width; x++) {
                 int argb = random.nextInt();
                 result[y][x] = argb;
             }
         return result;
     }
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         int[][] smallBlackPixels = getSimpleRawData(256, 256, 0);
         int[][] singleBlackPixel = getSimpleRawData(1, 1, 0);
         int[][] smallRedPixels = getSimpleRawData(256, 256, 0xffff0000);
@@ -85,20 +78,17 @@ public class PngWriteReadTest extends Im
         int[][] smallAscendingPixels = getAscendingRawData(256, 256);
         int[][] smallRandomPixels = randomRawData(256, 256);
 
-        int[][][] testData = {
-                smallBlackPixels, singleBlackPixel, smallRedPixels,
-                singleRedPixel, smallAscendingPixels, smallRandomPixels,
-        };
+        int[][][] testData = { smallBlackPixels, singleBlackPixel,
+                smallRedPixels, singleRedPixel, smallAscendingPixels,
+                smallRandomPixels, };
 
-        for (int i = 0; i < testData.length; i++)
-        {
+        for (int i = 0; i < testData.length; i++) {
             int rawData[][] = testData[i];
             writeAndReadImageData(rawData);
         }
     }
 
-    public void testTransparency() throws Exception
-    {
+    public void testTransparency() throws Exception {
         // Test for https://issues.apache.org/jira/browse/SANSELAN-52
         int[][] smallAscendingPixels = getAscendingRawData(256, 256);
         byte[] pngBytes = Imaging.writeImageToBytes(
@@ -107,48 +97,44 @@ public class PngWriteReadTest extends Im
         assertTrue(Imaging.getImageInfo(pngBytes).isTransparent());
     }
 
-    private BufferedImage imageDataToBufferedImage(int[][] rawData)
-    {
+    private BufferedImage imageDataToBufferedImage(int[][] rawData) {
         int width = rawData[0].length;
         int height = rawData.length;
         BufferedImage image = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int y = 0; y < height; y++)
-            for (int x = 0; x < width; x++)
-            {
+            for (int x = 0; x < width; x++) {
                 image.setRGB(x, y, rawData[y][x]);
             }
         return image;
     }
 
-    private int[][] bufferedImageToImageData(BufferedImage image)
-    {
+    private int[][] bufferedImageToImageData(BufferedImage image) {
         int width = image.getWidth();
         int height = image.getHeight();
         int[][] result = new int[height][width];
 
         for (int y = 0; y < height; y++)
-            for (int x = 0; x < width; x++)
-            {
+            for (int x = 0; x < width; x++) {
                 result[y][x] = image.getRGB(x, y);
             }
         return result;
     }
 
     private void writeAndReadImageData(int[][] rawData) throws IOException,
-            ImageReadException, ImageWriteException
-    {
+            ImageReadException, ImageWriteException {
         BufferedImage srcImage = imageDataToBufferedImage(rawData);
 
         Map writeParams = new HashMap();
-        //        writeParams.put(SanselanConstants.PARAM_KEY_FORMAT, ImageFormat.IMAGE_FORMAT_PNG);
-        //        writeParams.put(PngConstants.PARAM_KEY_PNG_FORCE_TRUE_COLOR,
-        //                Boolean.TRUE);
+        // writeParams.put(SanselanConstants.PARAM_KEY_FORMAT,
+        // ImageFormat.IMAGE_FORMAT_PNG);
+        // writeParams.put(PngConstants.PARAM_KEY_PNG_FORCE_TRUE_COLOR,
+        // Boolean.TRUE);
 
         byte bytes[] = Imaging.writeImageToBytes(srcImage,
                 ImageFormat.IMAGE_FORMAT_PNG, writeParams);
 
-        //        Debug.debug("bytes", bytes);
+        // Debug.debug("bytes", bytes);
 
         File tempFile = createTempFile("temp", ".png");
         IoUtils.writeToFile(bytes, tempFile);
@@ -163,19 +149,16 @@ public class PngWriteReadTest extends Im
         compare(rawData, dstData);
     }
 
-    private void compare(int[][] a, int[][] b)
-    {
+    private void compare(int[][] a, int[][] b) {
         assertNotNull(a);
         assertNotNull(b);
         assertTrue(a.length == b.length);
 
-        for (int y = 0; y < a.length; y++)
-        {
+        for (int y = 0; y < a.length; y++) {
             assertTrue(a[y].length == b[y].length);
             // make sure row lengths consistent.
             assertTrue(a[0].length == b[y].length);
-            for (int x = 0; x < a[y].length; x++)
-            {
+            for (int x = 0; x < a[y].length; x++) {
                 assertTrue(a[y][x] == b[y][x]);
             }
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java Sat May 26 21:19:03 2012
@@ -26,20 +26,19 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.ImagingTest;
 
 public abstract class RgbeBaseTest extends ImagingTest {
-    private static boolean isRgbe( File file ) throws IOException,
-                                                     ImageReadException
-    {
-        ImageFormat format = Imaging.guessFormat( file );
+    private static boolean isRgbe(File file) throws IOException,
+            ImageReadException {
+        ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_RGBE;
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept( File file ) throws IOException, ImageReadException {
-            return isRgbe( file );
+        public boolean accept(File file) throws IOException, ImageReadException {
+            return isRgbe(file);
         }
     };
 
     protected List getRgbeImages() throws IOException, ImageReadException {
-        return getTestImages( IMAGE_FILTER );
+        return getTestImages(IMAGE_FILTER);
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeReadTest.java Sat May 26 21:19:03 2012
@@ -30,28 +30,27 @@ import org.apache.commons.imaging.util.D
 
 public class RgbeReadTest extends RgbeBaseTest {
     public void test() throws IOException, ImageReadException,
-                              ImageWriteException
-    {
-        Debug.debug( "start" );
+            ImageWriteException {
+        Debug.debug("start");
 
         List images = getRgbeImages();
 
-        for ( int i = 0; i < images.size(); i++ ) {
-            if ( i % 10 == 0 ) {
+        for (int i = 0; i < images.size(); i++) {
+            if (i % 10 == 0) {
                 Debug.purgeMemory();
             }
 
-            File imageFile = (File) images.get( i );
-            Debug.debug( "imageFile", imageFile );
+            File imageFile = (File) images.get(i);
+            Debug.debug("imageFile", imageFile);
 
-            IImageMetadata metadata = Imaging.getMetadata( imageFile );
+            IImageMetadata metadata = Imaging.getMetadata(imageFile);
             assertNotNull(metadata);
 
-            ImageInfo imageInfo = Imaging.getImageInfo( imageFile );
-            assertNotNull( imageInfo );
+            ImageInfo imageInfo = Imaging.getImageInfo(imageFile);
+            assertNotNull(imageInfo);
 
-            BufferedImage image = Imaging.getBufferedImage( imageFile );
-            assertNotNull( image );
+            BufferedImage image = Imaging.getBufferedImage(imageFile);
+            assertNotNull(image);
         }
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java Sat May 26 21:19:03 2012
@@ -26,25 +26,21 @@ import org.apache.commons.imaging.ImageR
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.ImagingTest;
 
-public abstract class TiffBaseTest extends ImagingTest
-{
+public abstract class TiffBaseTest extends ImagingTest {
 
     private static boolean isTiff(File file) throws IOException,
-            ImageReadException
-    {
+            ImageReadException {
         ImageFormat format = Imaging.guessFormat(file);
         return format == ImageFormat.IMAGE_FORMAT_TIFF;
     }
 
     private static final ImageFilter imageFilter = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException
-        {
+        public boolean accept(File file) throws IOException, ImageReadException {
             return isTiff(file);
         }
     };
 
-    protected List getTiffImages() throws IOException, ImageReadException
-    {
+    protected List getTiffImages() throws IOException, ImageReadException {
         return getTestImages(imageFilter);
     }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffCcittTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffCcittTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffCcittTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffCcittTest.java Sat May 26 21:19:03 2012
@@ -45,10 +45,12 @@ public class TiffCcittTest extends TiffB
                     uncompressed[1] |= (0x80 >>> x);
                 }
             }
-            
+
             try {
-                byte[] compressed = T4AndT6Compression.compressModifiedHuffman(uncompressed, 5, 2);
-                byte[] result = T4AndT6Compression.decompressModifiedHuffman(compressed, 5, 2);
+                byte[] compressed = T4AndT6Compression.compressModifiedHuffman(
+                        uncompressed, 5, 2);
+                byte[] result = T4AndT6Compression.decompressModifiedHuffman(
+                        compressed, 5, 2);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -60,10 +62,12 @@ public class TiffCcittTest extends TiffB
                 Debug.debug(ex);
                 assertFalse(true);
             }
-            
+
             try {
-                byte[] compressed = T4AndT6Compression.compressT4_1D(uncompressed, 5, 2, true);
-                byte[] result = T4AndT6Compression.decompressT4_1D(compressed, 5, 2, true);
+                byte[] compressed = T4AndT6Compression.compressT4_1D(
+                        uncompressed, 5, 2, true);
+                byte[] result = T4AndT6Compression.decompressT4_1D(compressed,
+                        5, 2, true);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -75,10 +79,12 @@ public class TiffCcittTest extends TiffB
                 Debug.debug(ex);
                 assertFalse(true);
             }
-            
+
             try {
-                byte[] compressed = T4AndT6Compression.compressT4_1D(uncompressed, 5, 2, false);
-                byte[] result = T4AndT6Compression.decompressT4_1D(compressed, 5, 2, false);
+                byte[] compressed = T4AndT6Compression.compressT4_1D(
+                        uncompressed, 5, 2, false);
+                byte[] result = T4AndT6Compression.decompressT4_1D(compressed,
+                        5, 2, false);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -92,8 +98,10 @@ public class TiffCcittTest extends TiffB
             }
 
             try {
-                byte[] compressed = T4AndT6Compression.compressT4_2D(uncompressed, 5, 2, true, 2);
-                byte[] result = T4AndT6Compression.decompressT4_2D(compressed, 5, 2, true);
+                byte[] compressed = T4AndT6Compression.compressT4_2D(
+                        uncompressed, 5, 2, true, 2);
+                byte[] result = T4AndT6Compression.decompressT4_2D(compressed,
+                        5, 2, true);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -107,8 +115,10 @@ public class TiffCcittTest extends TiffB
             }
 
             try {
-                byte[] compressed = T4AndT6Compression.compressT4_2D(uncompressed, 5, 2, false, 2);
-                byte[] result = T4AndT6Compression.decompressT4_2D(compressed, 5, 2, false);
+                byte[] compressed = T4AndT6Compression.compressT4_2D(
+                        uncompressed, 5, 2, false, 2);
+                byte[] result = T4AndT6Compression.decompressT4_2D(compressed,
+                        5, 2, false);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -122,8 +132,10 @@ public class TiffCcittTest extends TiffB
             }
 
             try {
-                byte[] compressed = T4AndT6Compression.compressT6(uncompressed, 5, 2);
-                byte[] result = T4AndT6Compression.decompressT6(compressed, 5, 2);
+                byte[] compressed = T4AndT6Compression.compressT6(uncompressed,
+                        5, 2);
+                byte[] result = T4AndT6Compression.decompressT6(compressed, 5,
+                        2);
                 assertEquals(uncompressed.length, result.length);
                 for (int i = 0; i < uncompressed.length; i++) {
                     assertEquals(uncompressed[i], result[i]);
@@ -140,7 +152,8 @@ public class TiffCcittTest extends TiffB
 
     public void testAll5x2Images() {
         int[] combinations = new int[10];
-        BufferedImage image = new BufferedImage(5, 2, BufferedImage.TYPE_INT_RGB);
+        BufferedImage image = new BufferedImage(5, 2,
+                BufferedImage.TYPE_INT_RGB);
         do {
             for (int x = 0; x < 5; x++) {
                 if (combinations[x] == 0) {
@@ -153,14 +166,16 @@ public class TiffCcittTest extends TiffB
                 if (combinations[5 + x] == 0) {
                     image.setRGB(x, 1, 0xFFFFFF);
                 } else {
-                    image.setRGB(x, 1, 0);   
+                    image.setRGB(x, 1, 0);
                 }
             }
-            
+
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_1D);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_1D);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -173,12 +188,14 @@ public class TiffCcittTest extends TiffB
                 Debug.debug(ex);
                 assertFalse(true);
             }
-            
+
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
                 params.put(TiffConstants.PARAM_KEY_T4_OPTIONS, 0);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -191,12 +208,14 @@ public class TiffCcittTest extends TiffB
                 Debug.debug(ex);
                 assertFalse(true);
             }
-            
+
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
                 params.put(TiffConstants.PARAM_KEY_T4_OPTIONS, 4);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -212,9 +231,11 @@ public class TiffCcittTest extends TiffB
 
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
                 params.put(TiffConstants.PARAM_KEY_T4_OPTIONS, 1);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -230,9 +251,11 @@ public class TiffCcittTest extends TiffB
 
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3);
                 params.put(TiffConstants.PARAM_KEY_T4_OPTIONS, 5);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -248,8 +271,10 @@ public class TiffCcittTest extends TiffB
 
             try {
                 HashMap params = new HashMap();
-                params.put(ImagingConstants.PARAM_KEY_COMPRESSION, TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_4);
-                byte[] compressed = Imaging.writeImageToBytes(image, ImageFormat.IMAGE_FORMAT_TIFF, params);
+                params.put(ImagingConstants.PARAM_KEY_COMPRESSION,
+                        TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_4);
+                byte[] compressed = Imaging.writeImageToBytes(image,
+                        ImageFormat.IMAGE_FORMAT_TIFF, params);
                 BufferedImage result = Imaging.getBufferedImage(compressed);
                 compareImages(image, result);
             } catch (ImageWriteException ex) {
@@ -264,15 +289,18 @@ public class TiffCcittTest extends TiffB
             }
         } while (nextCombination(combinations, 1));
     }
-    
+
     /**
-     * Generates the next combination of elements in the sequence array,
-     * with each element having a maximum value of max.
-     * Initially, the sequence should be set to minimum values
-     * of each element.
-     * @param sequence the array of elements to update
-     * @param max the maximum value of each element in the sequence
-     * @return false if there is no more combinations (ie. nothing was done), true otherwise
+     * Generates the next combination of elements in the sequence array, with
+     * each element having a maximum value of max. Initially, the sequence
+     * should be set to minimum values of each element.
+     * 
+     * @param sequence
+     *            the array of elements to update
+     * @param max
+     *            the maximum value of each element in the sequence
+     * @return false if there is no more combinations (ie. nothing was done),
+     *         true otherwise
      */
     private static boolean nextCombination(int[] sequence, int max) {
         int i;
@@ -286,27 +314,24 @@ public class TiffCcittTest extends TiffB
         }
         return i < sequence.length;
     }
-    
-    private void compareImages(BufferedImage a, BufferedImage b)
-    {
+
+    private void compareImages(BufferedImage a, BufferedImage b) {
         assertEquals(a.getWidth(), b.getWidth());
         assertEquals(a.getHeight(), b.getHeight());
 
         for (int x = 0; x < a.getWidth(); x++)
-            for (int y = 0; y < a.getHeight(); y++)
-            {
+            for (int y = 0; y < a.getHeight(); y++) {
                 int a_argb = a.getRGB(x, y);
                 int b_argb = b.getRGB(x, y);
-                if (a_argb != b_argb)
-                {
+                if (a_argb != b_argb) {
                     Debug.debug("width", a.getWidth());
                     Debug.debug("height", a.getHeight());
                     Debug.debug("x", x);
                     Debug.debug("y", y);
-                    Debug.debug("a_argb", a_argb + " (0x"
-                            + Integer.toHexString(a_argb) + ")");
-                    Debug.debug("b_argb", b_argb + " (0x"
-                            + Integer.toHexString(b_argb) + ")");
+                    Debug.debug("a_argb",
+                            a_argb + " (0x" + Integer.toHexString(a_argb) + ")");
+                    Debug.debug("b_argb",
+                            b_argb + " (0x" + Integer.toHexString(b_argb) + ")");
                 }
                 assertEquals(a_argb, b_argb);
             }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffLzwTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffLzwTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffLzwTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffLzwTest.java Sat May 26 21:19:03 2012
@@ -28,21 +28,17 @@ import org.apache.commons.imaging.common
 import org.apache.commons.imaging.common.mylzw.MyLzwDecompressor;
 import org.apache.commons.imaging.util.Debug;
 
-public class TiffLzwTest extends TiffBaseTest implements BinaryConstants
-{
+public class TiffLzwTest extends TiffBaseTest implements BinaryConstants {
 
-    public void testTrivial() throws Exception
-    {
+    public void testTrivial() throws Exception {
         byte bytes[] = { 0, };
         compressRoundtripAndValidate(bytes);
     }
 
-    public void testMedium() throws Exception
-    {
+    public void testMedium() throws Exception {
         int LENGTH = 1024 * 32;
         byte bytes[] = new byte[LENGTH];
-        for (int modulator = 1; modulator < 255; modulator += 3)
-        {
+        for (int modulator = 1; modulator < 255; modulator += 3) {
             for (int i = 0; i < LENGTH; i++)
                 bytes[i] = (byte) (0xff & (i % modulator));
 
@@ -50,37 +46,35 @@ public class TiffLzwTest extends TiffBas
         }
     }
 
-//    public void testTiffImageData() throws IOException, ImageReadException,
-//            ImageWriteException
-//    {
-//        List images = getTiffImages();
-//        for (int i = 0; i < images.size(); i++)
-//        {
-//            if (i % 10 == 0)
-//                Debug.purgeMemory();
-//
-//            File imageFile = (File) images.get(i);
-//            Debug.debug("imageFile", imageFile);
-//
-//            ByteSource byteSource = new ByteSourceFile(imageFile);
-//            Map params = new HashMap();
-//            List data = new TiffImageParser().collectRawImageData(byteSource,
-//                    params);
-//
-//            for (int j = 0; j < data.size(); j++)
-//            {
-//                byte bytes[] = (byte[]) data.get(j);
-//                decompressRoundtripAndValidate(bytes);
-//            }
-//        }
-//    }
+    // public void testTiffImageData() throws IOException, ImageReadException,
+    // ImageWriteException
+    // {
+    // List images = getTiffImages();
+    // for (int i = 0; i < images.size(); i++)
+    // {
+    // if (i % 10 == 0)
+    // Debug.purgeMemory();
+    //
+    // File imageFile = (File) images.get(i);
+    // Debug.debug("imageFile", imageFile);
+    //
+    // ByteSource byteSource = new ByteSourceFile(imageFile);
+    // Map params = new HashMap();
+    // List data = new TiffImageParser().collectRawImageData(byteSource,
+    // params);
+    //
+    // for (int j = 0; j < data.size(); j++)
+    // {
+    // byte bytes[] = (byte[]) data.get(j);
+    // decompressRoundtripAndValidate(bytes);
+    // }
+    // }
+    // }
 
-    private void compressRoundtripAndValidate(byte src[]) throws IOException
-    {
+    private void compressRoundtripAndValidate(byte src[]) throws IOException {
         final boolean DEBUG = false;
 
-        if (DEBUG)
-        {
+        if (DEBUG) {
             Debug.debug();
             Debug.debug("roundtripAndValidate: " + src.length);
             Debug.debug();
@@ -89,23 +83,19 @@ public class TiffLzwTest extends TiffBas
         int LZW_MINIMUM_CODE_SIZE = 8;
         final List codes = new ArrayList();
         MyLzwCompressor.Listener compressionListener = new MyLzwCompressor.Listener() {
-            public void dataCode(int code)
-            {
+            public void dataCode(int code) {
                 codes.add(new Integer(code));
             }
 
-            public void eoiCode(int code)
-            {
+            public void eoiCode(int code) {
                 codes.add(new Integer(code));
             }
 
-            public void clearCode(int code)
-            {
+            public void clearCode(int code) {
                 codes.add(new Integer(code));
             }
 
-            public void init(int clearCode, int eoiCode)
-            {
+            public void init(int clearCode, int eoiCode) {
             }
         };
 
@@ -118,24 +108,19 @@ public class TiffLzwTest extends TiffBas
             int index = 0;
             int clearCode, eoiCode;
 
-            public void code(int code)
-            {
-                if (DEBUG)
-                {
-                    if (code == clearCode)
-                    {
+            public void code(int code) {
+                if (DEBUG) {
+                    if (code == clearCode) {
                         Debug.debug("clearCode: " + index + "/" + codes.size());
                         Debug.debug();
                     }
-                    if (code == eoiCode)
-                    {
+                    if (code == eoiCode) {
                         Debug.debug("eoiCode: " + index + "/" + codes.size());
                         Debug.debug();
                     }
                 }
                 Integer expectedCode = (Integer) codes.get(index++);
-                if (code != expectedCode.intValue())
-                {
+                if (code != expectedCode.intValue()) {
                     Debug.debug("bad code: " + index + "/" + codes.size());
                     Debug.debug("code: " + code + " (0x"
                             + Integer.toHexString(code) + ") "
@@ -154,8 +139,7 @@ public class TiffLzwTest extends TiffBas
                 }
             }
 
-            public void init(int clearCode, int eoiCode)
-            {
+            public void init(int clearCode, int eoiCode) {
                 this.clearCode = clearCode;
                 this.eoiCode = eoiCode;
             }
@@ -173,8 +157,7 @@ public class TiffLzwTest extends TiffBas
             assertEquals(src[i], decompressed[i]);
     }
 
-    private void decompressRoundtripAndValidate(byte src[]) throws IOException
-    {
+    private void decompressRoundtripAndValidate(byte src[]) throws IOException {
         Debug.debug();
         Debug.debug("roundtripAndValidate: " + src.length);
         Debug.debug();
@@ -184,8 +167,7 @@ public class TiffLzwTest extends TiffBas
 
         MyLzwDecompressor.Listener decompressionListener = new MyLzwDecompressor.Listener() {
 
-            public void code(int code)
-            {
+            public void code(int code) {
                 Debug.debug("listener code: " + code + " (0x"
                         + Integer.toHexString(code) + ") "
                         + Integer.toBinaryString(code) + ", index: "
@@ -193,8 +175,7 @@ public class TiffLzwTest extends TiffBas
                 codes.add(new Integer(code));
             }
 
-            public void init(int clearCode, int eoiCode)
-            {
+            public void init(int clearCode, int eoiCode) {
             }
 
         };
@@ -209,30 +190,25 @@ public class TiffLzwTest extends TiffBas
 
             int clearCode, eoiCode;
 
-            public void init(int clearCode, int eoiCode)
-            {
+            public void init(int clearCode, int eoiCode) {
                 this.clearCode = clearCode;
                 this.eoiCode = eoiCode;
             }
 
             int index = 0;
 
-            private void code(int code)
-            {
+            private void code(int code) {
 
-                if (code == clearCode)
-                {
+                if (code == clearCode) {
                     Debug.debug("clearCode: " + index + "/" + codes.size());
                     Debug.debug();
                 }
-                if (code == eoiCode)
-                {
+                if (code == eoiCode) {
                     Debug.debug("eoiCode: " + index + "/" + codes.size());
                     Debug.debug();
                 }
                 Integer expectedCode = (Integer) codes.get(index++);
-                if (code != expectedCode.intValue())
-                {
+                if (code != expectedCode.intValue()) {
                     Debug.debug("bad code: " + index + "/" + codes.size());
                     Debug.debug("code: " + code + " (0x"
                             + Integer.toHexString(code) + ") "
@@ -251,18 +227,15 @@ public class TiffLzwTest extends TiffBas
                 }
             }
 
-            public void dataCode(int code)
-            {
+            public void dataCode(int code) {
                 code(code);
             }
 
-            public void eoiCode(int code)
-            {
+            public void eoiCode(int code) {
                 code(code);
             }
 
-            public void clearCode(int code)
-            {
+            public void clearCode(int code) {
                 code(code);
             }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffReadTest.java Sat May 26 21:19:03 2012
@@ -26,14 +26,11 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.common.IImageMetadata;
 import org.apache.commons.imaging.util.Debug;
 
-public class TiffReadTest extends TiffBaseTest
-{
+public class TiffReadTest extends TiffBaseTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         List images = getTiffImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRoundtripTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRoundtripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRoundtripTest.java Sat May 26 21:19:03 2012
@@ -31,8 +31,7 @@ import org.apache.commons.imaging.util.D
 
 public class TiffRoundtripTest extends TiffBaseTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         List images = getTiffImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagIntegrityTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagIntegrityTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagIntegrityTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagIntegrityTest.java Sat May 26 21:19:03 2012
@@ -42,26 +42,38 @@ import org.apache.commons.imaging.format
 
 public class TiffTagIntegrityTest extends ImagingTest {
     public void testTagIntegrity() {
-        verifyFields(AdobePageMaker6TagConstants.class, AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAGS);
-        verifyFields(AdobePhotoshopTagConstants.class, AdobePhotoshopTagConstants.ALL_ADOBE_PHOTOSHOP_TAGS);
-        verifyFields(AliasSketchbookProTagConstants.class, AliasSketchbookProTagConstants.ALL_ALIAS_SKETCHBOOK_PRO_TAGS);
+        verifyFields(AdobePageMaker6TagConstants.class,
+                AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAGS);
+        verifyFields(AdobePhotoshopTagConstants.class,
+                AdobePhotoshopTagConstants.ALL_ADOBE_PHOTOSHOP_TAGS);
+        verifyFields(AliasSketchbookProTagConstants.class,
+                AliasSketchbookProTagConstants.ALL_ALIAS_SKETCHBOOK_PRO_TAGS);
         verifyFields(DcfTagConstants.class, DcfTagConstants.ALL_DCF_TAGS);
         verifyFields(DngTagConstants.class, DngTagConstants.ALL_DNG_TAGS);
         verifyFields(ExifTagConstants.class, ExifTagConstants.ALL_EXIF_TAGS);
-        verifyFields(GeoTiffTagConstants.class, GeoTiffTagConstants.ALL_GEO_TIFF_TAGS);
-        verifyFields(GdalLibraryTagConstants.class, GdalLibraryTagConstants.ALL_GDAL_LIBRARY_TAGS);
+        verifyFields(GeoTiffTagConstants.class,
+                GeoTiffTagConstants.ALL_GEO_TIFF_TAGS);
+        verifyFields(GdalLibraryTagConstants.class,
+                GdalLibraryTagConstants.ALL_GDAL_LIBRARY_TAGS);
         verifyFields(GpsTagConstants.class, GpsTagConstants.ALL_GPS_TAGS);
-        verifyFields(MolecularDynamicsGelTagConstants.class, MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS);
-        verifyFields(MicrosoftTagConstants.class, MicrosoftTagConstants.ALL_MICROSOFT_TAGS);
-        verifyFields(MicrosoftHdPhotoTagConstants.class, MicrosoftHdPhotoTagConstants.ALL_MICROSOFT_HD_PHOTO_TAGS);
-        verifyFields(OceScanjobTagConstants.class, OceScanjobTagConstants.ALL_OCE_SCANJOB_TAGS);
-        verifyFields(Rfc2301TagConstants.class, Rfc2301TagConstants.ALL_RFC_2301_TAGS);
+        verifyFields(
+                MolecularDynamicsGelTagConstants.class,
+                MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS);
+        verifyFields(MicrosoftTagConstants.class,
+                MicrosoftTagConstants.ALL_MICROSOFT_TAGS);
+        verifyFields(MicrosoftHdPhotoTagConstants.class,
+                MicrosoftHdPhotoTagConstants.ALL_MICROSOFT_HD_PHOTO_TAGS);
+        verifyFields(OceScanjobTagConstants.class,
+                OceScanjobTagConstants.ALL_OCE_SCANJOB_TAGS);
+        verifyFields(Rfc2301TagConstants.class,
+                Rfc2301TagConstants.ALL_RFC_2301_TAGS);
         verifyFields(Tiff4TagConstants.class, Tiff4TagConstants.ALL_TIFF_4_TAGS);
-        verifyFields(TiffEpTagConstants.class, TiffEpTagConstants.ALL_TIFF_EP_TAGS);
+        verifyFields(TiffEpTagConstants.class,
+                TiffEpTagConstants.ALL_TIFF_EP_TAGS);
         verifyFields(TiffTagConstants.class, TiffTagConstants.ALL_TIFF_TAGS);
         verifyFields(WangTagConstants.class, WangTagConstants.ALL_WANG_TAGS);
     }
-    
+
     private void verifyFields(Class<?> cls, List<TagInfo> tags) {
         Field[] fields = cls.getFields();
         int tagCount = 0;

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java Sat May 26 21:19:03 2012
@@ -22,22 +22,18 @@ import java.util.List;
 import org.apache.commons.imaging.ImageReadException;
 import org.apache.commons.imaging.ImagingTest;
 
-public abstract class WbmpBaseTest extends ImagingTest
-{
-    private static boolean isWbmp(File file)
-    {
+public abstract class WbmpBaseTest extends ImagingTest {
+    private static boolean isWbmp(File file) {
         return file.getName().toLowerCase().endsWith(".wbmp");
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException
-        {
+        public boolean accept(File file) throws IOException, ImageReadException {
             return isWbmp(file);
         }
     };
 
-    protected List getWbmpImages() throws IOException, ImageReadException
-    {
+    protected List getWbmpImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java Sat May 26 21:19:03 2012
@@ -26,16 +26,13 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.common.IImageMetadata;
 import org.apache.commons.imaging.util.Debug;
 
-public class WbmpReadTest extends WbmpBaseTest
-{
+public class WbmpReadTest extends WbmpBaseTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         Debug.debug("start");
 
         List images = getWbmpImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java Sat May 26 21:19:03 2012
@@ -22,23 +22,19 @@ import java.util.List;
 import org.apache.commons.imaging.ImageReadException;
 import org.apache.commons.imaging.ImagingTest;
 
-public abstract class XbmBaseTest extends ImagingTest
-{
+public abstract class XbmBaseTest extends ImagingTest {
 
-    private static boolean isXbm(File file)
-    {
+    private static boolean isXbm(File file) {
         return file.getName().toLowerCase().endsWith(".xbm");
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException
-        {
+        public boolean accept(File file) throws IOException, ImageReadException {
             return isXbm(file);
         }
     };
 
-    protected List getXbmImages() throws IOException, ImageReadException
-    {
+    protected List getXbmImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java Sat May 26 21:19:03 2012
@@ -26,16 +26,13 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.common.IImageMetadata;
 import org.apache.commons.imaging.util.Debug;
 
-public class XbmReadTest extends XbmBaseTest
-{
+public class XbmReadTest extends XbmBaseTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         Debug.debug("start");
 
         List images = getXbmImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java Sat May 26 21:19:03 2012
@@ -24,14 +24,11 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.ImagingTest;
 import org.apache.commons.imaging.util.Debug;
 
-public class XmpDumpTest extends ImagingTest
-{
+public class XmpDumpTest extends ImagingTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         List images = getTestImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java Sat May 26 21:19:03 2012
@@ -28,14 +28,11 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.ImagingTest;
 import org.apache.commons.imaging.util.Debug;
 
-public class XmpUpdateTest extends ImagingTest
-{
+public class XmpUpdateTest extends ImagingTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         List images = getTestImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 
@@ -59,13 +56,19 @@ public class XmpUpdateTest extends Imagi
 
             assertNotNull(xmpXml);
 
-            if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_PNG))
-            { /* do nothing */ }
-            else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF))
-            { /* do nothing */ }
-            else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_GIF))
-            { /* do nothing */ }
-            else
+            if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_PNG)) { /*
+                                                                     * do
+                                                                     * nothing
+                                                                     */
+            } else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF)) { /*
+                                                                             * do
+                                                                             * nothing
+                                                                             */
+            } else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_GIF)) { /*
+                                                                            * do
+                                                                            * nothing
+                                                                            */
+            } else
                 continue;
 
             File tempFile = this.createTempFile(imageFile.getName() + ".", "."
@@ -84,7 +87,7 @@ public class XmpUpdateTest extends Imagi
 
             assertEquals(xmpXmlOut, xmpXml);
 
-//            Debug.debug("xmpXmlOut", xmpXmlOut.length());
+            // Debug.debug("xmpXmlOut", xmpXmlOut.length());
             // Debug.debug("xmpXml", xmpXml);
             // Debug.debug();
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmBaseTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmBaseTest.java Sat May 26 21:19:03 2012
@@ -22,23 +22,19 @@ import java.util.List;
 import org.apache.commons.imaging.ImageReadException;
 import org.apache.commons.imaging.ImagingTest;
 
-public abstract class XpmBaseTest extends ImagingTest
-{
+public abstract class XpmBaseTest extends ImagingTest {
 
-    private static boolean isXpm(File file)
-    {
+    private static boolean isXpm(File file) {
         return file.getName().toLowerCase().endsWith(".xpm");
     }
 
     private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
-        public boolean accept(File file) throws IOException, ImageReadException
-        {
+        public boolean accept(File file) throws IOException, ImageReadException {
             return isXpm(file);
         }
     };
 
-    protected List getXpmImages() throws IOException, ImageReadException
-    {
+    protected List getXpmImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java Sat May 26 21:19:03 2012
@@ -26,16 +26,13 @@ import org.apache.commons.imaging.Imagin
 import org.apache.commons.imaging.common.IImageMetadata;
 import org.apache.commons.imaging.util.Debug;
 
-public class XpmReadTest extends XpmBaseTest
-{
+public class XpmReadTest extends XpmBaseTest {
 
-    public void test() throws Exception
-    {
+    public void test() throws Exception {
         Debug.debug("start");
 
         List images = getXpmImages();
-        for (int i = 0; i < images.size(); i++)
-        {
+        for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/roundtrip/RoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/roundtrip/RoundtripTest.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/roundtrip/RoundtripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/roundtrip/RoundtripTest.java Sat May 26 21:19:03 2012
@@ -33,15 +33,13 @@ import org.apache.commons.imaging.common
 import org.apache.commons.imaging.util.Debug;
 import org.apache.commons.imaging.util.IoUtils;
 
-public class RoundtripTest extends ImagingTest
-{
+public class RoundtripTest extends ImagingTest {
     private static final int COLOR_FULL_RGB = 0;
     private static final int COLOR_LIMITED_INDEX = 1;
     private static final int COLOR_GRAYSCALE = 2;
     private static final int COLOR_BITMAP = 3;
 
-    private static class FormatInfo
-    {
+    private static class FormatInfo {
 
         public final ImageFormat format;
         public final boolean canRead;
@@ -51,8 +49,7 @@ public class RoundtripTest extends Imagi
 
         public FormatInfo(ImageFormat format, boolean canRead,
                 boolean canWrite, int colorSupport,
-                final boolean identicalSecondWrite)
-        {
+                final boolean identicalSecondWrite) {
             this.canRead = canRead;
             this.canWrite = canWrite;
             this.colorSupport = colorSupport;
@@ -98,13 +95,11 @@ public class RoundtripTest extends Imagi
                     COLOR_FULL_RGB, false), //
     };
 
-    private BufferedImage createArgbBitmapImage(int width, int height)
-    {
+    private BufferedImage createArgbBitmapImage(int width, int height) {
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 // alternating black and white.
                 int modulator = y + 2; // make sure lines vary.
                 int argb = (x + y) % modulator == 0 ? 0xff000000 : 0xffffffff;
@@ -113,13 +108,11 @@ public class RoundtripTest extends Imagi
         return result;
     }
 
-    private BufferedImage createBitmapBitmapImage(int width, int height)
-    {
+    private BufferedImage createBitmapBitmapImage(int width, int height) {
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_BYTE_BINARY);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 // alternating black and white.
                 int modulator = y + 2; // make sure lines vary.
                 int argb = (x + y) % modulator == 0 ? 0xff000000 : 0xffffffff;
@@ -128,13 +121,11 @@ public class RoundtripTest extends Imagi
         return result;
     }
 
-    private BufferedImage createArgbGrayscaleImage(int width, int height)
-    {
+    private BufferedImage createArgbGrayscaleImage(int width, int height) {
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 int value = (256 * (x + y)) / (width + height);
                 int argb = (0xff << 24) | (value << 16) | (value << 8)
                         | (value << 0);
@@ -144,13 +135,11 @@ public class RoundtripTest extends Imagi
         return result;
     }
 
-    private BufferedImage createGrayscaleGrayscaleImage(int width, int height)
-    {
+    private BufferedImage createGrayscaleGrayscaleImage(int width, int height) {
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_BYTE_GRAY);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 int value = (256 * (x + y)) / (width + height);
                 int argb = (0xff << 24) | (value << 16) | (value << 8)
                         | (value << 0);
@@ -160,29 +149,25 @@ public class RoundtripTest extends Imagi
         return result;
     }
 
-    private BufferedImage createLimitedColorImage(int width, int height)
-    {
+    private BufferedImage createLimitedColorImage(int width, int height) {
         int colors[] = { 0xffffffff, 0xff000000, 0xfff00000, 0xff0000ff,
                 0xff123456, 0xfffefeff, 0xff7f817f, };
 
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 int argb = colors[(x + y) % colors.length];
                 result.setRGB(x, y, argb);
             }
         return result;
     }
 
-    private BufferedImage createFullColorImage(int width, int height)
-    {
+    private BufferedImage createFullColorImage(int width, int height) {
         BufferedImage result = new BufferedImage(width, height,
                 BufferedImage.TYPE_INT_ARGB);
         for (int x = 0; x < width; x++)
-            for (int y = 0; y < height; y++)
-            {
+            for (int y = 0; y < height; y++) {
                 int red = (x * 255) / width;
                 int green = (y * 255) / height;
                 int blue = ((x + y) * 255) / (width + height);
@@ -193,8 +178,7 @@ public class RoundtripTest extends Imagi
         return result;
     }
 
-    private void compareImagesExact(BufferedImage a, BufferedImage b)
-    {
+    private void compareImagesExact(BufferedImage a, BufferedImage b) {
         compareImages(a, b, 0);
     }
 
@@ -203,40 +187,35 @@ public class RoundtripTest extends Imagi
     // compareImages(a, b, 3); // one bit of rounding error for each channel
     // }
 
-    private void compareImages(BufferedImage a, BufferedImage b, int tolerance)
-    {
+    private void compareImages(BufferedImage a, BufferedImage b, int tolerance) {
         assertEquals(a.getWidth(), b.getWidth());
         assertEquals(a.getHeight(), b.getHeight());
 
         for (int x = 0; x < a.getWidth(); x++)
-            for (int y = 0; y < a.getHeight(); y++)
-            {
+            for (int y = 0; y < a.getHeight(); y++) {
                 int a_argb = a.getRGB(x, y);
                 int b_argb = b.getRGB(x, y);
-                if (a_argb != b_argb)
-                {
+                if (a_argb != b_argb) {
                     if (calculateARGBDistance(a_argb, b_argb) <= tolerance)
                         continue; // ignore.
                 }
-                if (a_argb != b_argb)
-                {
+                if (a_argb != b_argb) {
                     Debug.debug("width", a.getWidth());
                     Debug.debug("height", a.getHeight());
-                    Debug.debug("distance", calculateARGBDistance(a_argb,
-                            b_argb));
+                    Debug.debug("distance",
+                            calculateARGBDistance(a_argb, b_argb));
                     Debug.debug("x", x);
                     Debug.debug("y", y);
-                    Debug.debug("a_argb", a_argb + " (0x"
-                            + Integer.toHexString(a_argb) + ")");
-                    Debug.debug("b_argb", b_argb + " (0x"
-                            + Integer.toHexString(b_argb) + ")");
+                    Debug.debug("a_argb",
+                            a_argb + " (0x" + Integer.toHexString(a_argb) + ")");
+                    Debug.debug("b_argb",
+                            b_argb + " (0x" + Integer.toHexString(b_argb) + ")");
                 }
                 assertEquals(a_argb, b_argb);
             }
     }
 
-    private int calculateARGBDistance(int a, int b)
-    {
+    private int calculateARGBDistance(int a, int b) {
         int aAlpha = 0xff & (a >> 24);
         int aRed = 0xff & (a >> 16);
         int aGreen = 0xff & (a >> 8);
@@ -251,8 +230,7 @@ public class RoundtripTest extends Imagi
 
     }
 
-    private void compareFilesExact(File a, File b) throws IOException
-    {
+    private void compareFilesExact(File a, File b) throws IOException {
         assertTrue(a.exists() && a.isFile());
         assertTrue(b.exists() && b.isFile());
         assertEquals(a.length(), b.length());
@@ -260,27 +238,24 @@ public class RoundtripTest extends Imagi
         byte aData[] = IoUtils.getFileBytes(a);
         byte bData[] = IoUtils.getFileBytes(b);
 
-        for (int i = 0; i < a.length(); i++)
-        {
+        for (int i = 0; i < a.length(); i++) {
             int aByte = 0xff & aData[i];
             int bByte = 0xff & bData[i];
 
-            if (aByte != bByte)
-            {
+            if (aByte != bByte) {
                 Debug.debug("a", a);
                 Debug.debug("b", b);
                 Debug.debug("i", i);
-                Debug.debug("aByte", aByte + " (0x"
-                        + Integer.toHexString(aByte) + ")");
-                Debug.debug("bByte", bByte + " (0x"
-                        + Integer.toHexString(bByte) + ")");
+                Debug.debug("aByte",
+                        aByte + " (0x" + Integer.toHexString(aByte) + ")");
+                Debug.debug("bByte",
+                        bByte + " (0x" + Integer.toHexString(bByte) + ")");
             }
             assertEquals(aByte, bByte);
         }
     }
 
-    public void testBitmapRoundtrip() throws Exception
-    {
+    public void testBitmapRoundtrip() throws Exception {
         BufferedImage testImages[] = { //
 
         createArgbBitmapImage(1, 1), // minimal
@@ -294,12 +269,10 @@ public class RoundtripTest extends Imagi
                 createBitmapBitmapImage(300, 300), // larger than 256
         };
 
-        for (int j = 0; j < testImages.length; j++)
-        {
+        for (int j = 0; j < testImages.length; j++) {
             BufferedImage testImage = testImages[j];
 
-            for (int i = 0; i < FORMAT_INFOS.length; i++)
-            {
+            for (int i = 0; i < FORMAT_INFOS.length; i++) {
                 FormatInfo formatInfo = FORMAT_INFOS[i];
                 if ((!formatInfo.canRead) || (!formatInfo.canWrite))
                     continue;
@@ -311,8 +284,7 @@ public class RoundtripTest extends Imagi
         }
     }
 
-    public void testGrayscaleRoundtrip() throws Exception
-    {
+    public void testGrayscaleRoundtrip() throws Exception {
         BufferedImage testImages[] = { //
 
         createArgbBitmapImage(1, 1), // minimal
@@ -326,12 +298,10 @@ public class RoundtripTest extends Imagi
                 createGrayscaleGrayscaleImage(300, 300), // larger than 256
         };
 
-        for (int j = 0; j < testImages.length; j++)
-        {
+        for (int j = 0; j < testImages.length; j++) {
             BufferedImage testImage = testImages[j];
 
-            for (int i = 0; i < FORMAT_INFOS.length; i++)
-            {
+            for (int i = 0; i < FORMAT_INFOS.length; i++) {
                 FormatInfo formatInfo = FORMAT_INFOS[i];
                 if ((!formatInfo.canRead) || (!formatInfo.canWrite))
                     continue;
@@ -347,8 +317,7 @@ public class RoundtripTest extends Imagi
         }
     }
 
-    public void testLimitedColorRoundtrip() throws Exception
-    {
+    public void testLimitedColorRoundtrip() throws Exception {
         BufferedImage testImages[] = { //
 
         createLimitedColorImage(1, 1), // minimal
@@ -357,12 +326,10 @@ public class RoundtripTest extends Imagi
                 createLimitedColorImage(300, 300), // larger than 256
         };
 
-        for (int j = 0; j < testImages.length; j++)
-        {
+        for (int j = 0; j < testImages.length; j++) {
             BufferedImage testImage = testImages[j];
 
-            for (int i = 0; i < FORMAT_INFOS.length; i++)
-            {
+            for (int i = 0; i < FORMAT_INFOS.length; i++) {
                 FormatInfo formatInfo = FORMAT_INFOS[i];
                 if ((!formatInfo.canRead) || (!formatInfo.canWrite))
                     continue;
@@ -380,8 +347,7 @@ public class RoundtripTest extends Imagi
         }
     }
 
-    public void testFullColorRoundtrip() throws Exception
-    {
+    public void testFullColorRoundtrip() throws Exception {
         BufferedImage testImages[] = { //
 
         createFullColorImage(1, 1), // minimal
@@ -390,12 +356,10 @@ public class RoundtripTest extends Imagi
                 createFullColorImage(300, 300), // larger than 256
         };
 
-        for (int j = 0; j < testImages.length; j++)
-        {
+        for (int j = 0; j < testImages.length; j++) {
             BufferedImage testImage = testImages[j];
 
-            for (int i = 0; i < FORMAT_INFOS.length; i++)
-            {
+            for (int i = 0; i < FORMAT_INFOS.length; i++) {
                 FormatInfo formatInfo = FORMAT_INFOS[i];
                 if ((!formatInfo.canRead) || (!formatInfo.canWrite))
                     continue;
@@ -417,8 +381,7 @@ public class RoundtripTest extends Imagi
 
     private void roundtrip(FormatInfo formatInfo, BufferedImage testImage,
             String tempPrefix, boolean imageExact) throws IOException,
-            ImageReadException, ImageWriteException
-    {
+            ImageReadException, ImageWriteException {
         File temp1 = createTempFile(tempPrefix + ".", "."
                 + formatInfo.format.extension);
         // Debug.debug("tempFile: " + tempFile.getName());
@@ -432,15 +395,13 @@ public class RoundtripTest extends Imagi
         BufferedImage image2 = Imaging.getBufferedImage(temp1, readParams);
         assertNotNull(image2);
 
-        if (imageExact)
-        {
+        if (imageExact) {
             // note tolerance when comparing grayscale images
             // BufferedImages of
             compareImagesExact(testImage, image2);
         }
 
-        if (formatInfo.identicalSecondWrite)
-        {
+        if (formatInfo.identicalSecondWrite) {
             File temp2 = createTempFile(tempPrefix + ".", "."
                     + formatInfo.format.extension);
             // Debug.debug("tempFile: " + tempFile.getName());

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/test/util/FileSystemTraversal.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/test/util/FileSystemTraversal.java?rev=1342971&r1=1342970&r2=1342971&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/test/util/FileSystemTraversal.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/test/util/FileSystemTraversal.java Sat May 26 21:19:03 2012
@@ -21,73 +21,58 @@ import java.io.File;
 
 import org.apache.commons.imaging.util.Debug;
 
-public class FileSystemTraversal
-{
+public class FileSystemTraversal {
 
     public static final int MODE_FILES = 1;
     public static final int MODE_FOLDERS = 2;
     public static final int MODE_FILES_AND_FOLDERS = 3;
     public static final int MODE_ALL = 4;
 
-    public interface Visitor
-    {
+    public interface Visitor {
         public boolean visit(File file, double progressEstimate);
     }
 
-    public boolean traverseFiles(File file, Visitor visitor)
-    {
+    public boolean traverseFiles(File file, Visitor visitor) {
 
         return traverse(file, MODE_FILES, visitor);
     }
 
-    public boolean traverseFolders(File file, Visitor visitor)
-    {
+    public boolean traverseFolders(File file, Visitor visitor) {
 
         return traverse(file, MODE_FOLDERS, visitor);
     }
 
-    public boolean traverseAll(File file, Visitor visitor)
-    {
+    public boolean traverseAll(File file, Visitor visitor) {
 
         return traverse(file, MODE_FILES_AND_FOLDERS, visitor);
     }
 
-    public boolean traverse(File file, int mode, Visitor visitor)
-    {
+    public boolean traverse(File file, int mode, Visitor visitor) {
         return traverse(file, mode, visitor, 0, 1);
     }
 
     private boolean traverse(File file, int mode, Visitor visitor,
-            double estimate, double estimateIncrement)
-    {
+            double estimate, double estimateIncrement) {
 
-        if (file.isFile())
-        {
+        if (file.isFile()) {
             if ((mode == MODE_FILES) || (mode == MODE_FILES_AND_FOLDERS)
-                    || (mode == MODE_ALL))
-            {
+                    || (mode == MODE_ALL)) {
                 if (!visitor.visit(file, estimate))
                     return false;
             }
-        }
-        else if (file.isDirectory())
-        {
+        } else if (file.isDirectory()) {
             File files[] = file.listFiles();
-            if (files != null)
-            {
-                for (int i = 0; i < files.length; i++)
-                {
+            if (files != null) {
+                for (int i = 0; i < files.length; i++) {
                     File child = files[i];
-                    if (ON_MAC_OS_X && child.isDirectory())
-                    {
+                    if (ON_MAC_OS_X && child.isDirectory()) {
                         String name = child.getName();
                         if (name.equalsIgnoreCase("automount")
                                 || name.equalsIgnoreCase("private")
                                 || name.equalsIgnoreCase("Network")
-                                || name.equalsIgnoreCase("Volumes"))
-                        {
+                                || name.equalsIgnoreCase("Volumes")) {
                             continue;
-                            //                            return true;
+                            // return true;
                         }
                     }
 
@@ -99,16 +84,12 @@ public class FileSystemTraversal
             }
 
             if ((mode == MODE_FOLDERS) || (mode == MODE_FILES_AND_FOLDERS)
-                    || (mode == MODE_ALL))
-            {
+                    || (mode == MODE_ALL)) {
                 if (!visitor.visit(file, estimate))
                     return false;
             }
-        }
-        else
-        {
-            if (mode == MODE_ALL)
-            {
+        } else {
+            if (mode == MODE_ALL) {
                 if (!visitor.visit(file, estimate))
                     return false;
             }
@@ -117,39 +98,31 @@ public class FileSystemTraversal
         return true;
     }
 
-    public boolean traverseFiles(Visitor visitor)
-    {
+    public boolean traverseFiles(Visitor visitor) {
 
         return traverse(MODE_FILES, visitor);
     }
 
-    public boolean traverseFolders(Visitor visitor)
-    {
+    public boolean traverseFolders(Visitor visitor) {
 
         return traverse(MODE_FOLDERS, visitor);
     }
 
-    public boolean traverseAll(Visitor visitor)
-    {
+    public boolean traverseAll(Visitor visitor) {
 
         return traverse(MODE_FILES_AND_FOLDERS, visitor);
     }
 
-    public boolean traverse(int mode, Visitor visitor)
-    {
+    public boolean traverse(int mode, Visitor visitor) {
         return traverse(mode, visitor, 0, 1);
     }
 
     private static boolean ON_MAC_OS_X;
 
-    static
-    {
-        try
-        {
+    static {
+        try {
             ON_MAC_OS_X = (System.getProperty("mrj.version") != null);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             Debug.debug(e);
 
             ON_MAC_OS_X = false;
@@ -157,23 +130,19 @@ public class FileSystemTraversal
     }
 
     private boolean traverse(int mode, Visitor visitor, double estimate,
-            double estimateIncrement)
-    {
+            double estimateIncrement) {
         File roots[] = File.listRoots();
 
-        if (ON_MAC_OS_X)
-        {
+        if (ON_MAC_OS_X) {
             File Volumes = new File("/Volumes/");
             roots = Volumes.listFiles();
-        }
-        else
+        } else
             roots = File.listRoots();
 
         if (roots == null)
             return false;
 
-        for (int i = 0; i < roots.length; i++)
-        {
+        for (int i = 0; i < roots.length; i++) {
             File root = roots[i];
 
             if (root == null || !root.exists())
@@ -187,4 +156,4 @@ public class FileSystemTraversal
         return true;
     }
 
-}
\ No newline at end of file
+}



Mime
View raw message