xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r1567287 - in /xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics: image/ image/codec/png/ image/codec/tiff/ image/rendered/ java2d/ util/io/
Date Tue, 11 Feb 2014 18:45:51 GMT
Author: vhennebert
Date: Tue Feb 11 18:45:50 2014
New Revision: 1567287

URL: http://svn.apache.org/r1567287
Log:
Fix OperatorWrap

Modified:
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java Tue Feb 11 18:45:50 2014
@@ -260,8 +260,8 @@ public final class GraphicsUtil {
         DataBufferInt srcDB         = (DataBufferInt)src.getDataBuffer();
         final int []  srcPixels     = srcDB.getBankData()[0];
         final int     srcBase =
-            (srcDB.getOffset() +
-             srcSPPSM.getOffset(x0 - src.getSampleModelTranslateX(),
+            (srcDB.getOffset()
+             + srcSPPSM.getOffset(x0 - src.getSampleModelTranslateX(),
                                 y0 - src.getSampleModelTranslateY()));
 
 
@@ -272,12 +272,12 @@ public final class GraphicsUtil {
         DataBufferInt dstDB         = (DataBufferInt)dst.getDataBuffer();
         final int []  dstPixels     = dstDB.getBankData()[0];
         final int     dstBase =
-            (dstDB.getOffset() +
-             dstSPPSM.getOffset(x0 - dst.getSampleModelTranslateX(),
+            (dstDB.getOffset()
+             + dstSPPSM.getOffset(x0 - dst.getSampleModelTranslateX(),
                                 y0 - dst.getSampleModelTranslateY()));
 
-        if ((srcScanStride == dstScanStride) &&
-            (srcScanStride == width)) {
+        if ((srcScanStride == dstScanStride)
+            && (srcScanStride == width)) {
             // System.out.println("VERY Fast copyData");
 
             System.arraycopy(srcPixels, srcBase, dstPixels, dstBase,
@@ -342,8 +342,8 @@ public final class GraphicsUtil {
      * @param dst The destination for the data.
      */
     public static void copyData(Raster src, WritableRaster dst) {
-        if (is_INT_PACK_Data(src.getSampleModel(), false) &&
-            is_INT_PACK_Data(dst.getSampleModel(), false)) {
+        if (is_INT_PACK_Data(src.getSampleModel(), false)
+            && is_INT_PACK_Data(dst.getSampleModel(), false)) {
             copyData_INT_PACK(src, dst);
             return;
         }
@@ -668,8 +668,8 @@ public final class GraphicsUtil {
         //                    " is: " + dst.isAlphaPremultiplied());
 
         if (srcAlpha == dstAlpha) {
-            if (!srcAlpha ||
-                    src.isAlphaPremultiplied() == dst.isAlphaPremultiplied()) {
+            if (!srcAlpha
+                    || src.isAlphaPremultiplied() == dst.isAlphaPremultiplied()) {
                 // They match one another so just copy everything...
                 copyData(src.getRaster(), dst.getRaster());
                 return;
@@ -915,8 +915,8 @@ public final class GraphicsUtil {
         if (masks[2] != 0x000000ff) {
             return false;
         }
-        if ((masks.length == 4) &&
-            (masks[3] != 0xff000000)) {
+        if ((masks.length == 4)
+            && (masks[3] != 0xff000000)) {
             return false;
         }
 
@@ -948,8 +948,8 @@ public final class GraphicsUtil {
         final int scanStride = sppsm.getScanlineStride();
         DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
         final int base
-            = (db.getOffset() +
-               sppsm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
+            = (db.getOffset()
+               + sppsm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
                                wr.getMinY() - wr.getSampleModelTranslateY()));
 
         // Access the pixel data array
@@ -965,10 +965,10 @@ public final class GraphicsUtil {
                 } else if (a < 255) {
                     int aFP = (0x00FF0000 / a);
                     pixels[sp] =
-                        ((a << 24) |
-                         (((((pixel & 0xFF0000) >> 16) * aFP) & 0xFF0000)) |
-                         (((((pixel & 0x00FF00) >> 8) * aFP) & 0xFF0000) >> 8) |
-                         (((((pixel & 0x0000FF))    * aFP) & 0xFF0000) >> 16));
+                        ((a << 24)
+                         | (((((pixel & 0xFF0000) >> 16) * aFP) & 0xFF0000))
+                         | (((((pixel & 0x00FF00) >> 8) * aFP) & 0xFF0000) >> 8)
+                         | (((((pixel & 0x0000FF))    * aFP) & 0xFF0000) >> 16));
                 }
                 sp++;
             }
@@ -986,8 +986,8 @@ public final class GraphicsUtil {
         final int scanStride = sppsm.getScanlineStride();
         DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
         final int base
-            = (db.getOffset() +
-               sppsm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
+            = (db.getOffset()
+               + sppsm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
                                wr.getMinY() - wr.getSampleModelTranslateY()));
         // Access the pixel data array
         final int[] pixels = db.getBankData()[0];
@@ -998,10 +998,10 @@ public final class GraphicsUtil {
                 int pixel = pixels[sp];
                 int a = pixel >>> 24;
                 if ((a >= 0) && (a < 255)) {   // this does NOT include a == 255 (0xff) !
-                    pixels[sp] = ((a << 24) |
-                                  ((((pixel & 0xFF0000) * a) >> 8) & 0xFF0000) |
-                                  ((((pixel & 0x00FF00) * a) >> 8) & 0x00FF00) |
-                                  ((((pixel & 0x0000FF) * a) >> 8) & 0x0000FF));
+                    pixels[sp] = ((a << 24)
+                                  | ((((pixel & 0xFF0000) * a) >> 8) & 0xFF0000)
+                                  | ((((pixel & 0x00FF00) * a) >> 8) & 0x00FF00)
+                                  | ((((pixel & 0x0000FF) * a) >> 8) & 0x0000FF));
                 }
                 sp++;
             }
@@ -1023,8 +1023,8 @@ public final class GraphicsUtil {
 
         DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
         final int base
-            = (db.getOffset() +
-               csm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
+            = (db.getOffset()
+               + csm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
                              wr.getMinY() - wr.getSampleModelTranslateY()));
 
         int aOff = bandOff[bandOff.length - 1];
@@ -1067,8 +1067,8 @@ public final class GraphicsUtil {
 
         DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
         final int base
-            = (db.getOffset() +
-               csm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
+            = (db.getOffset()
+               + csm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
                              wr.getMinY() - wr.getSampleModelTranslateY()));
 
 

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java Tue Feb 11 18:45:50 2014
@@ -137,8 +137,8 @@ public abstract class PNGEncodeParam imp
          * <code>IllegalArgumentException</code> will be thrown.
          */
         public void setBitDepth(int bitDepth) {
-            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 &&
-                bitDepth != 8) {
+            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4
+                && bitDepth != 8) {
                 throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam2"));
             }
             this.bitDepth = bitDepth;
@@ -312,8 +312,8 @@ public abstract class PNGEncodeParam imp
          * values will be shifted and left-filled with zeroes.
          */
         public void setBitDepth(int bitDepth) {
-            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 &&
-                bitDepth != 8 && bitDepth != 16) {
+            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4
+                && bitDepth != 8 && bitDepth != 16) {
                 throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam2"));
             }
             this.bitDepth = bitDepth;

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java Tue Feb 11 18:45:50 2014
@@ -423,8 +423,8 @@ class PNGImage extends SimpleRenderedIma
 
         bitDepth = chunk.getInt1(8);
 
-        if ((bitDepth != 1) && (bitDepth != 2) && (bitDepth != 4) &&
-            (bitDepth != 8) && (bitDepth != 16)) {
+        if ((bitDepth != 1) && (bitDepth != 2) && (bitDepth != 4)
+            && (bitDepth != 8) && (bitDepth != 16)) {
             // Error -- bad bit depth
             String msg = PropertyUtil.getString("PNGImageDecoder3");
             throw new RuntimeException(msg);
@@ -432,11 +432,11 @@ class PNGImage extends SimpleRenderedIma
         maxOpacity = (1 << bitDepth) - 1;
 
         colorType = chunk.getInt1(9);
-        if ((colorType != PNG_COLOR_GRAY) &&
-            (colorType != PNG_COLOR_RGB) &&
-            (colorType != PNG_COLOR_PALETTE) &&
-            (colorType != PNG_COLOR_GRAY_ALPHA) &&
-            (colorType != PNG_COLOR_RGB_ALPHA)) {
+        if ((colorType != PNG_COLOR_GRAY)
+            && (colorType != PNG_COLOR_RGB)
+            && (colorType != PNG_COLOR_PALETTE)
+            && (colorType != PNG_COLOR_GRAY_ALPHA)
+            && (colorType != PNG_COLOR_RGB_ALPHA)) {
             System.out.println(PropertyUtil.getString("PNGImageDecoder4"));
         }
 
@@ -471,8 +471,8 @@ class PNGImage extends SimpleRenderedIma
         if (generateEncodeParam) {
             if (colorType == PNG_COLOR_PALETTE) {
                 encodeParam = new PNGEncodeParam.Palette();
-            } else if (colorType == PNG_COLOR_GRAY ||
-                       colorType == PNG_COLOR_GRAY_ALPHA) {
+            } else if (colorType == PNG_COLOR_GRAY
+                       || colorType == PNG_COLOR_GRAY_ALPHA) {
                 encodeParam = new PNGEncodeParam.Gray();
             } else {
                 encodeParam = new PNGEncodeParam.RGB();
@@ -655,8 +655,8 @@ class PNGImage extends SimpleRenderedIma
 
         // Create an empty WritableRaster
         int depth = bitDepth;
-        if ((colorType == PNG_COLOR_GRAY) &&
-            (bitDepth < 8) && output8BitGray) {
+        if ((colorType == PNG_COLOR_GRAY)
+            && (bitDepth < 8) && output8BitGray) {
             depth = 8;
         }
         if ((colorType == PNG_COLOR_PALETTE) && expandPalette) {
@@ -673,9 +673,9 @@ class PNGImage extends SimpleRenderedIma
         if (performGammaCorrection && (gammaLut == null)) {
             initGammaLut(bitDepth);
         }
-        if ((postProcess == POST_GRAY_LUT) ||
-            (postProcess == POST_GRAY_LUT_ADD_TRANS) ||
-            (postProcess == POST_GRAY_LUT_ADD_TRANS_EXP)) {
+        if ((postProcess == POST_GRAY_LUT)
+            || (postProcess == POST_GRAY_LUT_ADD_TRANS)
+            || (postProcess == POST_GRAY_LUT_ADD_TRANS_EXP)) {
             initGrayLut(bitDepth);
         }
 
@@ -697,8 +697,8 @@ class PNGImage extends SimpleRenderedIma
                                                  greenPalette,
                                                  bluePalette);
             }
-        } else if ((colorType == PNG_COLOR_GRAY) &&
-                   (bitDepth < 8) && !output8BitGray) {
+        } else if ((colorType == PNG_COLOR_GRAY)
+                   && (bitDepth < 8) && !output8BitGray) {
             byte[] palette = expandBits[bitDepth];
             colorModel = new IndexColorModel(bitDepth,
                                              palette.length,
@@ -1225,8 +1225,8 @@ class PNGImage extends SimpleRenderedIma
                         setTransparentRGB(rgbTrans);
                 }
             }
-        } else if (colorType == PNG_COLOR_GRAY_ALPHA ||
-                   colorType == PNG_COLOR_RGB_ALPHA) {
+        } else if (colorType == PNG_COLOR_GRAY_ALPHA
+                   || colorType == PNG_COLOR_RGB_ALPHA) {
             // Error -- GA or RGBA image can't have a tRNS chunk.
             String msg = PropertyUtil.getString("PNGImageDecoder15");
             throw new RuntimeException(msg);
@@ -1489,9 +1489,9 @@ class PNGImage extends SimpleRenderedIma
                     pd[1] = g;
                     pd[2] = b;
                 }
-                if ((r == redTransparentAlpha) &&
-                    (g == greenTransparentAlpha) &&
-                    (b == blueTransparentAlpha)) {
+                if ((r == redTransparentAlpha)
+                    && (g == greenTransparentAlpha)
+                    && (b == blueTransparentAlpha)) {
                     pd[3] = 0;
                 } else {
                     pd[3] = maxOpacity;

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java Tue Feb 11 18:45:50 2014
@@ -669,9 +669,9 @@ public class PNGImageEncoder extends Ima
     }
 
     private void writeTRNS() throws IOException {
-        if (param.isTransparencySet() &&
-            (colorType != PNG_COLOR_GRAY_ALPHA) &&
-            (colorType != PNG_COLOR_RGB_ALPHA)) {
+        if (param.isTransparencySet()
+            && (colorType != PNG_COLOR_GRAY_ALPHA)
+            && (colorType != PNG_COLOR_RGB_ALPHA)) {
             ChunkStream cs = new ChunkStream("tRNS");
 
             if (param instanceof PNGEncodeParam.Palette) {
@@ -843,9 +843,9 @@ public class PNGImageEncoder extends Ima
         int entries = 1 << bitDepth;
         for (int i = 0; i < entries; i++) {
             byte red = redPalette[i];
-            if ((red != i * grayFactor) ||
-                (red != greenPalette[i]) ||
-                (red != bluePalette[i])) {
+            if ((red != i * grayFactor)
+                || (red != greenPalette[i])
+                || (red != bluePalette[i])) {
                 return null;
             }
 

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java Tue Feb 11 18:45:50 2014
@@ -115,15 +115,15 @@ public class PNGRed extends AbstractRed 
         }
 
         public int getInt2(int offset) {
-            return ((data[offset] & 0xff) << 8) |
-                (data[offset + 1] & 0xff);
+            return ((data[offset] & 0xff) << 8)
+                | (data[offset + 1] & 0xff);
         }
 
         public int getInt4(int offset) {
-            return ((data[offset] & 0xff) << 24) |
-                ((data[offset + 1] & 0xff) << 16) |
-                ((data[offset + 2] & 0xff) << 8) |
-                (data[offset + 3] & 0xff);
+            return ((data[offset] & 0xff) << 24)
+                | ((data[offset + 1] & 0xff) << 16)
+                | ((data[offset + 2] & 0xff) << 8)
+                | (data[offset + 3] & 0xff);
         }
 
         public String getString4(int offset) {
@@ -542,11 +542,11 @@ public class PNGRed extends AbstractRed 
         maxOpacity = (1 << bitDepth) - 1;
 
         colorType = chunk.getInt1(9);
-        if ((colorType != PNG_COLOR_GRAY) &&
-            (colorType != PNG_COLOR_RGB) &&
-            (colorType != PNG_COLOR_PALETTE) &&
-            (colorType != PNG_COLOR_GRAY_ALPHA) &&
-            (colorType != PNG_COLOR_RGB_ALPHA)) {
+        if ((colorType != PNG_COLOR_GRAY)
+            && (colorType != PNG_COLOR_RGB)
+            && (colorType != PNG_COLOR_PALETTE)
+            && (colorType != PNG_COLOR_GRAY_ALPHA)
+            && (colorType != PNG_COLOR_RGB_ALPHA)) {
             System.out.println(PropertyUtil.getString("PNGImageDecoder4"));
         }
 
@@ -581,8 +581,8 @@ public class PNGRed extends AbstractRed 
         if (generateEncodeParam) {
             if (colorType == PNG_COLOR_PALETTE) {
                 encodeParam = new PNGEncodeParam.Palette();
-            } else if (colorType == PNG_COLOR_GRAY ||
-                       colorType == PNG_COLOR_GRAY_ALPHA) {
+            } else if (colorType == PNG_COLOR_GRAY
+                       || colorType == PNG_COLOR_GRAY_ALPHA) {
                 encodeParam = new PNGEncodeParam.Gray();
             } else {
                 encodeParam = new PNGEncodeParam.RGB();
@@ -765,8 +765,8 @@ public class PNGRed extends AbstractRed 
 
         // Create an empty WritableRaster
         int depth = bitDepth;
-        if ((colorType == PNG_COLOR_GRAY) &&
-            (bitDepth < 8) && output8BitGray) {
+        if ((colorType == PNG_COLOR_GRAY)
+            && (bitDepth < 8) && output8BitGray) {
             depth = 8;
         }
         if ((colorType == PNG_COLOR_PALETTE) && expandPalette) {
@@ -786,9 +786,9 @@ public class PNGRed extends AbstractRed 
         if (performGammaCorrection && (gammaLut == null)) {
             initGammaLut(bitDepth);
         }
-        if ((postProcess == POST_GRAY_LUT) ||
-            (postProcess == POST_GRAY_LUT_ADD_TRANS) ||
-            (postProcess == POST_GRAY_LUT_ADD_TRANS_EXP)) {
+        if ((postProcess == POST_GRAY_LUT)
+            || (postProcess == POST_GRAY_LUT_ADD_TRANS)
+            || (postProcess == POST_GRAY_LUT_ADD_TRANS_EXP)) {
             initGrayLut(bitDepth);
         }
 
@@ -818,8 +818,8 @@ public class PNGRed extends AbstractRed 
                                                  greenPalette,
                                                  bluePalette);
             }
-        } else if ((colorType == PNG_COLOR_GRAY) &&
-                   (bitDepth < 8) && !output8BitGray) {
+        } else if ((colorType == PNG_COLOR_GRAY)
+                   && (bitDepth < 8) && !output8BitGray) {
             byte[] palette = expandBits[bitDepth];
             cm = new IndexColorModel(bitDepth,
                                              palette.length,
@@ -1348,8 +1348,8 @@ public class PNGRed extends AbstractRed 
                         setTransparentRGB(rgbTrans);
                 }
             }
-        } else if (colorType == PNG_COLOR_GRAY_ALPHA ||
-                   colorType == PNG_COLOR_RGB_ALPHA) {
+        } else if (colorType == PNG_COLOR_GRAY_ALPHA
+                   || colorType == PNG_COLOR_RGB_ALPHA) {
             // Error -- GA or RGBA image can't have a tRNS chunk.
             String msg = PropertyUtil.getString("PNGImageDecoder15");
             throw new RuntimeException(msg);
@@ -1627,9 +1627,9 @@ public class PNGRed extends AbstractRed 
                     pd[1] = g;
                     pd[2] = b;
                 }
-                if ((r == redTransparentAlpha) &&
-                    (g == greenTransparentAlpha) &&
-                    (b == blueTransparentAlpha)) {
+                if ((r == redTransparentAlpha)
+                    && (g == greenTransparentAlpha)
+                    && (b == blueTransparentAlpha)) {
                     pd[3] = 0;
                 } else {
                     pd[3] = maxOpacity;

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java Tue Feb 11 18:45:50 2014
@@ -1363,8 +1363,8 @@ class TIFFFaxDecoder {
         int i3 = 0;
         if (bitsFromNext2NextByte != 0) {
             i2 <<= bitsFromNext2NextByte;
-            i3 = (next2next & table2[bitsFromNext2NextByte]) >>>
-                (8 - bitsFromNext2NextByte);
+            i3 = (next2next & table2[bitsFromNext2NextByte])
+                >>> (8 - bitsFromNext2NextByte);
             i2 |= i3;
             bytePointer++;
             bitPointer = bitsFromNext2NextByte;

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Tue Feb 11 18:45:50 2014
@@ -129,8 +129,8 @@ public class TIFFImage extends AbstractR
         try {
             inflater.inflate(inflated);
         } catch (DataFormatException dfe) {
-            throw new RuntimeException(PropertyUtil.getString("TIFFImage17") + ": " +
-                                       dfe.getMessage());
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage17") + ": "
+                                       + dfe.getMessage());
         }
         inflater.reset();
     }
@@ -190,9 +190,9 @@ public class TIFFImage extends AbstractR
         decodePaletteAsShorts = param.getDecodePaletteAsShorts();
 
         // Read the specified directory.
-        TIFFDirectory dir = param.getIFDOffset() == null ?
-            new TIFFDirectory(stream, directory) :
-            new TIFFDirectory(stream, param.getIFDOffset().longValue(),
+        TIFFDirectory dir = param.getIFDOffset() == null
+            ? new TIFFDirectory(stream, directory)
+            : new TIFFDirectory(stream, param.getIFDOffset().longValue(),
                               directory);
 
         // Get the number of samples per pixel
@@ -202,9 +202,9 @@ public class TIFFImage extends AbstractR
         // Read the TIFF_PLANAR_CONFIGURATION field
         TIFFField planarConfigurationField =
             dir.getField(TIFFImageDecoder.TIFF_PLANAR_CONFIGURATION);
-        char[] planarConfiguration = planarConfigurationField == null ?
-            new char[] {1} :
-            planarConfigurationField.getAsChars();
+        char[] planarConfiguration = planarConfigurationField == null
+            ? new char[] {1}
+            : planarConfigurationField.getAsChars();
 
             // Support planar format (band sequential) only for 1 sample/pixel.
             if (planarConfiguration[0] != 1 && samplesPerPixel != 1) {
@@ -263,8 +263,8 @@ public class TIFFImage extends AbstractR
                 break;
             case 16:
                 if (sampleFormat[0] != 3) {
-                    dataType = sampleFormat[0] == 2 ?
-                        DataBuffer.TYPE_SHORT : DataBuffer.TYPE_USHORT;
+                    dataType = sampleFormat[0] == 2
+                        ? DataBuffer.TYPE_SHORT : DataBuffer.TYPE_USHORT;
                     isValidDataFormat = true;
                 }
                 break;
@@ -328,8 +328,8 @@ public class TIFFImage extends AbstractR
                 }
                 break;
             case 3: // RGB Palette
-                if (samplesPerPixel == 1 &&
-                   (sampleSize == 4 || sampleSize == 8 || sampleSize == 16)) {
+                if (samplesPerPixel == 1
+                   && (sampleSize == 4 || sampleSize == 8 || sampleSize == 16)) {
                     imageType = TYPE_PALETTE;
                 }
                 break;
@@ -385,18 +385,18 @@ public class TIFFImage extends AbstractR
                 // instead of the tile offsets and byte counts. Therefore
                 // we default here to the tile dimensions if they are written.
                 tileWidth =
-                    dir.getField(TIFFImageDecoder.TIFF_TILE_WIDTH) != null ?
-                    (int)dir.getFieldAsLong(TIFFImageDecoder.TIFF_TILE_WIDTH) :
-                    bounds.width;
+                    dir.getField(TIFFImageDecoder.TIFF_TILE_WIDTH) != null
+                    ? (int)dir.getFieldAsLong(TIFFImageDecoder.TIFF_TILE_WIDTH)
+                    : bounds.width;
                 TIFFField field =
                     dir.getField(TIFFImageDecoder.TIFF_ROWS_PER_STRIP);
                 if (field == null) {
                     // Default is infinity (2^32 -1), basically the entire image
 
                     tileHeight =
-                        dir.getField(TIFFImageDecoder.TIFF_TILE_LENGTH) != null ?
-                        (int)dir.getFieldAsLong(TIFFImageDecoder.TIFF_TILE_LENGTH) :
-                        bounds.height;
+                        dir.getField(TIFFImageDecoder.TIFF_TILE_LENGTH) != null
+                        ? (int)dir.getFieldAsLong(TIFFImageDecoder.TIFF_TILE_LENGTH)
+                        : bounds.height;
                 } else {
                     long l = field.getAsLong(0);
                     long infinity = 1;
@@ -743,8 +743,8 @@ public class TIFFImage extends AbstractR
      * Returns tile (tileX, tileY) as a Raster.
      */
     public synchronized Raster getTile(int tileX, int tileY) {
-        if ((tileX < 0) || (tileX >= tilesX) ||
-            (tileY < 0) || (tileY >= tilesY)) {
+        if ((tileX < 0) || (tileX >= tilesX)
+            || (tileY < 0) || (tileY >= tilesY)) {
             throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage12"));
         }
 
@@ -783,8 +783,8 @@ public class TIFFImage extends AbstractR
             save_offset = stream.getFilePointer();
             stream.seek(tileOffsets[tileY * tilesX + tileX]);
         } catch (IOException ioe) {
-            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
         }
 
         // Number of bytes in this tile (strip) after compression.
@@ -802,8 +802,8 @@ public class TIFFImage extends AbstractR
         int unitsInThisTile = newRect.width * newRect.height * numBands;
 
         // Allocate read buffer if needed.
-        byte[] data = compression != COMP_NONE || imageType == TYPE_PALETTE ?
-            new byte[byteCount] : null;
+        byte[] data = compression != COMP_NONE || imageType == TYPE_PALETTE
+            ? new byte[byteCount] : null;
 
         // Read the data, uncompressing as needed. There are four cases:
         // bilevel, palette-RGB, 4-bit grayscale, and everything else.
@@ -845,8 +845,8 @@ public class TIFFImage extends AbstractR
 
                 stream.seek(save_offset);
             } catch (IOException ioe) {
-                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
             }
         } else if (imageType == TYPE_PALETTE) { // palette-RGB
             if (sampleSize == 16) {
@@ -913,8 +913,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
 
                     if (dataType == DataBuffer.TYPE_USHORT) {
@@ -1013,8 +1013,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
                 }
 
@@ -1063,8 +1063,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
 
                     // Expand the palette image into an rgb image with ushort
@@ -1119,8 +1119,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
                 }
 
@@ -1138,8 +1138,8 @@ public class TIFFImage extends AbstractR
                         stream.readFully(data, 0, byteCount);
                         stream.seek(save_offset);
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
 
                     // If compressed, decode the data.
@@ -1225,8 +1225,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
                     }
                 }
             }
@@ -1242,8 +1242,8 @@ public class TIFFImage extends AbstractR
                     if ((newRect.width % 8) == 0) {
                         bytesInThisTile = (newRect.width / 2) * newRect.height;
                     } else {
-                        bytesInThisTile = (newRect.width / 2 + 1) *
-                            newRect.height;
+                        bytesInThisTile = (newRect.width / 2 + 1)
+                            * newRect.height;
                     }
 
                     decodePackbits(data, bytesInThisTile, bdata);
@@ -1265,8 +1265,8 @@ public class TIFFImage extends AbstractR
 
                 stream.seek(save_offset);
             } catch (IOException ioe) {
-                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
             }
         } else { // everything else
             try {
@@ -1340,8 +1340,8 @@ public class TIFFImage extends AbstractR
                                                unitsInThisTile);
 
                     }
-                } else if (sampleSize == 32 &&
-                           dataType == DataBuffer.TYPE_INT) { // redundant
+                } else if (sampleSize == 32
+                           && dataType == DataBuffer.TYPE_INT) { // redundant
                     if (compression == COMP_NONE) {
 
                         readInts(byteCount / 4, idata);
@@ -1389,8 +1389,8 @@ public class TIFFImage extends AbstractR
                 stream.seek(save_offset);
 
             } catch (IOException ioe) {
-                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
             }
 
             // Modify the data for certain special cases.
@@ -1401,8 +1401,8 @@ public class TIFFImage extends AbstractR
                     // Since we are using a ComponentColorModel with this
                     // image, we need to change the WhiteIsZero data to
                     // BlackIsZero data so it will display properly.
-                    if (dataType == DataBuffer.TYPE_BYTE &&
-                        !(getColorModel() instanceof IndexColorModel)) {
+                    if (dataType == DataBuffer.TYPE_BYTE
+                        && !(getColorModel() instanceof IndexColorModel)) {
 
                         for (int l = 0; l < bdata.length; l += numBands) {
                             bdata[l] = (byte)(255 - bdata[l]);
@@ -1421,8 +1421,8 @@ public class TIFFImage extends AbstractR
                         }
                     } else if (dataType == DataBuffer.TYPE_INT) {
 
-                        long uintMax = ((long)Integer.MAX_VALUE -
-                                        (long)Integer.MIN_VALUE);
+                        long uintMax = ((long)Integer.MAX_VALUE
+                                        - (long)Integer.MIN_VALUE);
                         for (int l = 0; l < idata.length; l += numBands) {
                             idata[l] = (int)(uintMax - idata[l]);
                         }
@@ -1550,8 +1550,8 @@ public class TIFFImage extends AbstractR
         try {
             stream.readFully(byteArray, 0, byteCount);
         } catch (IOException ioe) {
-            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
         }
 
         interpretBytesAsShorts(byteArray, shortArray, shortCount);
@@ -1567,8 +1567,8 @@ public class TIFFImage extends AbstractR
         try {
             stream.readFully(byteArray, 0, byteCount);
         } catch (IOException ioe) {
-            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
-                                       ioe.getMessage());
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": "
+                                       + ioe.getMessage());
         }
 
         interpretBytesAsInts(byteArray, intArray, intCount);
@@ -1612,19 +1612,19 @@ public class TIFFImage extends AbstractR
         if (isBigEndian) {
 
             for (int i = 0; i < intCount; i++) {
-                intArray[i] = (((byteArray[j++] & 0xff) << 24) |
-                               ((byteArray[j++] & 0xff) << 16) |
-                               ((byteArray[j++] & 0xff) << 8) |
-                               (byteArray[j++] & 0xff));
+                intArray[i] = (((byteArray[j++] & 0xff) << 24)
+                               | ((byteArray[j++] & 0xff) << 16)
+                               | ((byteArray[j++] & 0xff) << 8)
+                               | (byteArray[j++] & 0xff));
             }
 
         } else {
 
             for (int i = 0; i < intCount; i++) {
-                intArray[i] = ((byteArray[j++] & 0xff) |
-                              ((byteArray[j++] & 0xff) << 8) |
-                              ((byteArray[j++] & 0xff) << 16) |
-                              ((byteArray[j++] & 0xff) << 24));
+                intArray[i] = ((byteArray[j++] & 0xff)
+                              | ((byteArray[j++] & 0xff) << 8)
+                              | ((byteArray[j++] & 0xff) << 16)
+                              | ((byteArray[j++] & 0xff) << 24));
             }
         }
     }
@@ -1666,8 +1666,8 @@ public class TIFFImage extends AbstractR
                 }
             }
         } catch (java.lang.ArrayIndexOutOfBoundsException ae) {
-            throw new RuntimeException(PropertyUtil.getString("TIFFImage14") + ": " +
-                                       ae.getMessage());
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage14") + ": "
+                                       + ae.getMessage());
         }
 
         return dst;
@@ -1690,8 +1690,8 @@ public class TIFFImage extends AbstractR
                 cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
                 break;
             default:
-                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage19") + ": " +
-                                                   numBands);
+                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage19") + ": "
+                                                   + numBands);
         }
 
         int componentSize = 0;
@@ -1707,8 +1707,8 @@ public class TIFFImage extends AbstractR
                 componentSize = 32;
                 break;
             default:
-                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage20") + ": " +
-                                                   dataType);
+                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage20") + ": "
+                                                   + dataType);
         }
 
         RGBBits = new int[numBands];

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java Tue Feb 11 18:45:50 2014
@@ -519,11 +519,11 @@ public class TIFFImageEncoder extends Im
 
         // Whether to test for contiguous data.
         boolean checkContiguous =
-            ((dataTypeSize == 1 &&
-              sampleModel instanceof MultiPixelPackedSampleModel &&
-              dataType == DataBuffer.TYPE_BYTE) ||
-             (dataTypeSize == 8 &&
-              sampleModel instanceof ComponentSampleModel));
+            ((dataTypeSize == 1
+              && sampleModel instanceof MultiPixelPackedSampleModel
+              && dataType == DataBuffer.TYPE_BYTE)
+             || (dataTypeSize == 8
+              && sampleModel instanceof ComponentSampleModel));
 
         // Also create a buffer to hold tileHeight lines of the
         // data to be written to the file, so we can use array writes.
@@ -533,8 +533,8 @@ public class TIFFImageEncoder extends Im
                 bpixels = new byte[tileHeight * tileWidth * numBands];
             } else if (dataTypeIsShort) {
                 bpixels = new byte[2 * tileHeight * tileWidth * numBands];
-            } else if (dataType == DataBuffer.TYPE_INT ||
-                      dataType == DataBuffer.TYPE_FLOAT) {
+            } else if (dataType == DataBuffer.TYPE_INT
+                      || dataType == DataBuffer.TYPE_FLOAT) {
                 bpixels = new byte[4 * tileHeight * tileWidth * numBands];
             }
         }
@@ -544,8 +544,8 @@ public class TIFFImageEncoder extends Im
         int lastCol = minX + width;
         int tileNum = 0;
         for (int row = minY; row < lastRow; row += tileHeight) {
-            int rows = isTiled ?
-                tileHeight : Math.min(tileHeight, lastRow - row);
+            int rows = isTiled
+                ? tileHeight : Math.min(tileHeight, lastRow - row);
             int size = rows * tileWidth * numBands;
 
             for (int col = minX; col < lastCol; col += tileWidth) {
@@ -564,16 +564,16 @@ public class TIFFImageEncoder extends Im
                             int pixelStride = csm.getPixelStride();
                             int lineStride = csm.getScanlineStride();
 
-                            if (pixelStride != numBands ||
-                               lineStride != bytesPerRow) {
+                            if (pixelStride != numBands
+                               || lineStride != bytesPerRow) {
                                 useDataBuffer = false;
                             } else {
                                 useDataBuffer = true;
                                 for (int i = 0;
                                     useDataBuffer && i < numBands;
                                     i++) {
-                                    if (bankIndices[i] != 0 ||
-                                       bandOffsets[i] != i) {
+                                    if (bankIndices[i] != 0
+                                       || bandOffsets[i] != i) {
                                         useDataBuffer = false;
                                     }
                                 }
@@ -581,9 +581,9 @@ public class TIFFImageEncoder extends Im
                         } else { // 1-bit
                             MultiPixelPackedSampleModel mpp =
                                 (MultiPixelPackedSampleModel)src.getSampleModel();
-                            if (mpp.getNumBands() == 1 &&
-                               mpp.getDataBitOffset() == 0 &&
-                               mpp.getPixelBitStride() == 1) {
+                            if (mpp.getNumBands() == 1
+                               && mpp.getDataBitOffset() == 0
+                               && mpp.getPixelBitStride() == 1) {
                                 useDataBuffer = true;
                             }
                         }
@@ -615,10 +615,10 @@ public class TIFFImageEncoder extends Im
                             (MultiPixelPackedSampleModel)src.getSampleModel();
                         int lineStride = mpp.getScanlineStride();
                         int inOffset =
-                            mpp.getOffset(col -
-                                          src.getSampleModelTranslateX(),
-                                          row -
-                                          src.getSampleModelTranslateY());
+                            mpp.getOffset(col
+                                          - src.getSampleModelTranslateX(),
+                                          row
+                                          - src.getSampleModelTranslateY());
                         if (lineStride == bytesPerRow) {
                             System.arraycopy(btmp, inOffset,
                                              bpixels, 0,
@@ -643,14 +643,14 @@ public class TIFFImageEncoder extends Im
                             for (int j = 0; j < tileWidth / 8; j++) {
 
                                 pixel =
-                                    (pixels[index++] << 7) |
-                                    (pixels[index++] << 6) |
-                                    (pixels[index++] << 5) |
-                                    (pixels[index++] << 4) |
-                                    (pixels[index++] << 3) |
-                                    (pixels[index++] << 2) |
-                                    (pixels[index++] << 1) |
-                                    pixels[index++];
+                                    (pixels[index++] << 7)
+                                    | (pixels[index++] << 6)
+                                    | (pixels[index++] << 5)
+                                    | (pixels[index++] << 4)
+                                    | (pixels[index++] << 3)
+                                    | (pixels[index++] << 2)
+                                    | (pixels[index++] << 1)
+                                    | pixels[index++];
                                 bpixels[k++] = (byte)pixel;
                             }
 
@@ -730,10 +730,10 @@ public class TIFFImageEncoder extends Im
                             ComponentSampleModel csm =
                                 (ComponentSampleModel)src.getSampleModel();
                             int inOffset =
-                                csm.getOffset(col -
-                                              src.getSampleModelTranslateX(),
-                                              row -
-                                              src.getSampleModelTranslateY());
+                                csm.getOffset(col
+                                              - src.getSampleModelTranslateX(),
+                                              row
+                                              - src.getSampleModelTranslateY());
                             int lineStride = csm.getScanlineStride();
                             if (lineStride == bytesPerRow) {
                                 System.arraycopy(btmp,
@@ -856,8 +856,8 @@ public class TIFFImageEncoder extends Im
             }
             totalBytes += (int)tileByteCounts[numTiles - 1];
 
-            nextIFDOffset = isLast ?
-                0 : ifdOffset + dirSize + totalBytes;
+            nextIFDOffset = isLast
+                ? 0 : ifdOffset + dirSize + totalBytes;
             if ((nextIFDOffset & 0x01) != 0) {   // make it even
                 nextIFDOffset++;
                 skipByte = true;
@@ -1323,8 +1323,8 @@ public class TIFFImageEncoder extends Im
         while (inOffset <= inMax) {
             int run = 1;
             byte replicate = input[inOffset];
-            while (run < 127 && inOffset < inMax &&
-                  input[inOffset] == input[inOffset + 1]) {
+            while (run < 127 && inOffset < inMax
+                  && input[inOffset] == input[inOffset + 1]) {
                 run++;
                 inOffset++;
             }
@@ -1336,11 +1336,11 @@ public class TIFFImageEncoder extends Im
 
             run = 0;
             int saveOffset = outOffset;
-            while (run < 128 &&
-                  ((inOffset < inMax &&
-                    input[inOffset] != input[inOffset + 1]) ||
-                   (inOffset < inMaxMinus1 &&
-                    input[inOffset] != input[inOffset + 2]))) {
+            while (run < 128
+                  && ((inOffset < inMax
+                    && input[inOffset] != input[inOffset + 1])
+                   || (inOffset < inMaxMinus1
+                    && input[inOffset] != input[inOffset + 2]))) {
                 run++;
                 output[++outOffset] = input[inOffset++];
             }

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java Tue Feb 11 18:45:50 2014
@@ -87,8 +87,8 @@ public class TIFFLZWDecoder {
         int code, oldCode = 0;
         byte[] string;
 
-        while ((code = getNextCode()) != 257 &&
-                dstIndex != uncompData.length) {
+        while ((code = getNextCode()) != 257
+                && dstIndex != uncompData.length) {
 
             if (code == 256) {
 

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java Tue Feb 11 18:45:50 2014
@@ -103,8 +103,8 @@ public class Any2sRGBRed extends Abstrac
         if (masks[2] != 0x000000ff) {
             return false;
         }
-        if ((masks.length == 4) &&
-            (masks[3] != 0xff000000)) {
+        if ((masks.length == 4)
+            && (masks[3] != 0xff000000)) {
             return false;
         }
 
@@ -148,8 +148,8 @@ public class Any2sRGBRed extends Abstrac
         DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
 
         final int     srcBase
-            = (db.getOffset() +
-               sm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
+            = (db.getOffset()
+               + sm.getOffset(wr.getMinX() - wr.getSampleModelTranslateX(),
                             wr.getMinY() - wr.getSampleModelTranslateY()));
         // Access the pixel data array
         final int[] pixels   = db.getBankData()[0];
@@ -167,10 +167,10 @@ public class Any2sRGBRed extends Abstrac
             while (sp < end) {
                 pix = pixels[sp];
                 pixels[sp] =
-                    ((pix & 0xFF000000) |
-                     (lut[(pix >>> 16) & 0xFF] << 16) |
-                     (lut[(pix >>> 8) & 0xFF] << 8) |
-                     (lut[pix & 0xFF]));
+                    ((pix & 0xFF000000)
+                     | (lut[(pix >>> 16) & 0xFF] << 16)
+                     | (lut[(pix >>> 8) & 0xFF] << 8)
+                     | (lut[pix & 0xFF]));
                 sp++;
             }
         }
@@ -187,8 +187,8 @@ public class Any2sRGBRed extends Abstrac
 
 
         // Fast case, Linear SRGB source, INT Pack writable raster...
-        if (srcIsLsRGB &&
-            is_INT_PACK_COMP(wr.getSampleModel())) {
+        if (srcIsLsRGB
+            && is_INT_PACK_COMP(wr.getSampleModel())) {
             src.copyData(wr);
             if (srcCM.hasAlpha()) {
                 GraphicsUtil.coerceData(wr, srcCM, false);
@@ -236,8 +236,8 @@ public class Any2sRGBRed extends Abstrac
             return wr;
         }
 
-        if (srcCM.getColorSpace() ==
-            ColorSpace.getInstance(ColorSpace.CS_GRAY)) {
+        if (srcCM.getColorSpace()
+            == ColorSpace.getInstance(ColorSpace.CS_GRAY)) {
 
             // This is a little bit of a hack.  There is only
             // a linear grayscale ICC profile in the JDK so

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java Tue Feb 11 18:45:50 2014
@@ -885,8 +885,8 @@ public class GraphicContext implements C
         //
         Object antialiasingHint = hints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
         boolean isAntialiased = true;
-        if (antialiasingHint != RenderingHints.VALUE_TEXT_ANTIALIAS_ON &&
-           antialiasingHint != RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT) {
+        if (antialiasingHint != RenderingHints.VALUE_TEXT_ANTIALIAS_ON
+           && antialiasingHint != RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT) {
 
             // If antialias was not turned off, then use the general rendering
             // hint.
@@ -894,8 +894,8 @@ public class GraphicContext implements C
                 antialiasingHint = hints.get(RenderingHints.KEY_ANTIALIASING);
 
                 // Test general hint
-                if (antialiasingHint != RenderingHints.VALUE_ANTIALIAS_ON &&
-                   antialiasingHint != RenderingHints.VALUE_ANTIALIAS_DEFAULT) {
+                if (antialiasingHint != RenderingHints.VALUE_ANTIALIAS_ON
+                   && antialiasingHint != RenderingHints.VALUE_ANTIALIAS_DEFAULT) {
                     // Antialiasing was not requested. However, if it was not turned
                     // off explicitly, use it.
                     if (antialiasingHint == RenderingHints.VALUE_ANTIALIAS_OFF) {

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java Tue Feb 11 18:45:50 2014
@@ -126,8 +126,8 @@ public abstract class TransformStackElem
         txf.getMatrix(matrix);
         return new TransformStackElement(TransformType.GENERAL, matrix) {
                 boolean isIdentity(double[] m) {
-                    return (m[0] == 1 && m[2] == 0 && m[4] == 0 &&
-                            m[1] == 0 && m[3] == 1 && m[5] == 0);
+                    return (m[0] == 1 && m[2] == 0 && m[4] == 0
+                            && m[1] == 0 && m[3] == 1 && m[5] == 0);
                 }
             };
     }

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java?rev=1567287&r1=1567286&r2=1567287&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java Tue Feb 11 18:45:50 2014
@@ -148,9 +148,9 @@ public class Base64DecodeStream extends 
 
             int in = off, out = off;
             while (in < off + count) {
-                if ((decode_buffer[in] != '\n') &&
-                    (decode_buffer[in] != '\r') &&
-                    (decode_buffer[in] != ' ')) {
+                if ((decode_buffer[in] != '\n')
+                    && (decode_buffer[in] != '\r')
+                    && (decode_buffer[in] != ' ')) {
                     decode_buffer[out++] = decode_buffer[in];
                 }
                 in++;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message