You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by vh...@apache.org on 2014/02/11 19:39:20 UTC

svn commit: r1567280 - in /xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics: image/ image/codec/png/ image/codec/tiff/ image/loader/impl/ image/rendered/ java2d/color/ java2d/ps/ util/io/ xmp/

Author: vhennebert
Date: Tue Feb 11 18:39:20 2014
New Revision: 1567280

URL: http://svn.apache.org/r1567280
Log:
Fix ParenPad

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/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/TIFFDirectory.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/loader/impl/PreloaderEMF.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.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/color/ICCColorSpaceWithIntent.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
    xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/xmp/XMPHandler.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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -911,8 +911,8 @@ public final class GraphicsUtil {
                     int aFP = (0x00FF0000 / a);
                     pixels[sp] =
                         ((a << 24) |
-                         (((((pixel & 0xFF0000) >> 16) * aFP) & 0xFF0000)    ) |
-                         (((((pixel & 0x00FF00) >> 8) * aFP) & 0xFF0000) >> 8 ) |
+                         (((((pixel & 0xFF0000) >> 16) * aFP) & 0xFF0000)) |
+                         (((((pixel & 0x00FF00) >> 8) * aFP) & 0xFF0000) >> 8) |
                          (((((pixel & 0x0000FF))    * aFP) & 0xFF0000) >> 16));
                 }
                 sp++;

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -1120,7 +1120,7 @@ class PNGImage extends SimpleRenderedIma
         StringBuffer key = new StringBuffer();
         int textIndex = 0;
         while ((b = chunk.getByte(textIndex++)) != 0) {
-            key.append( (char)b );
+            key.append((char)b);
         }
 
         StringBuilder value = new StringBuilder();
@@ -1239,7 +1239,7 @@ class PNGImage extends SimpleRenderedIma
         StringBuffer key = new StringBuffer();
         byte b;
         while ((b = chunk.getByte(textIndex++)) != 0) {
-            key.append( (char)b );
+            key.append((char)b);
         }
         /* int method = */ chunk.getByte(textIndex++);
 

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -182,7 +182,7 @@ class ChunkStream extends OutputStream i
     @Override
     public void close() throws IOException {
 
-        if ( baos != null ) {
+        if (baos != null) {
             baos.close();
             baos = 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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -502,7 +502,7 @@ public class PNGRed extends AbstractRed 
                               + (char)((type >> 24) & 0xff)
                               + (char)((type >> 16) & 0xff)
                               + (char)((type >>  8) & 0xff)
-                              + (char)( type        & 0xff);
+                              + (char)(type        & 0xff);
             return typeString;
         } catch (Exception e) {
             e.printStackTrace();
@@ -758,7 +758,7 @@ public class PNGRed extends AbstractRed 
 
         // Parse prior IDAT chunks
         InputStream seqStream =
-            new SequenceInputStream( Collections.enumeration( streamVec ));
+            new SequenceInputStream(Collections.enumeration(streamVec));
         InputStream infStream =
             new InflaterInputStream(seqStream, new Inflater());
         dataStream = new DataInputStream(infStream);
@@ -1379,8 +1379,8 @@ public class PNGRed extends AbstractRed 
                 value.append((char)c);
             }
 
-            ztextKeys.add(key.toString() );
-            ztextStrings.add(value.toString() );
+            ztextKeys.add(key.toString());
+            ztextStrings.add(value.toString());
         } catch (Exception e) {
             e.printStackTrace();
         }

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java Tue Feb 11 18:39:20 2014
@@ -262,7 +262,7 @@ public class TIFFDirectory implements Se
 
                         // When we encountered zero, means one string has ended
                         v.add(new String(bvalues, prevIndex,
-                                         (index - prevIndex)) );
+                                         (index - prevIndex)));
                         prevIndex = index;
                     }
 

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -1615,7 +1615,7 @@ public class TIFFImage extends AbstractR
                 intArray[i] = (((byteArray[j++] & 0xff) << 24) |
                                ((byteArray[j++] & 0xff) << 16) |
                                ((byteArray[j++] & 0xff) << 8) |
-                               ( byteArray[j++] & 0xff));
+                               (byteArray[j++] & 0xff));
             }
 
         } else {

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -808,7 +808,7 @@ public class TIFFImageEncoder extends Im
                             bpixels[li++] = (byte)((value & 0xff000000) >>> 24);
                             bpixels[li++] = (byte)((value & 0x00ff0000) >>> 16);
                             bpixels[li++] = (byte)((value & 0x0000ff00) >>> 8);
-                            bpixels[li++] = (byte)( value & 0x000000ff);
+                            bpixels[li++] = (byte)(value & 0x000000ff);
                         }
                     } else { // DataBuffer.TYPE_FLOAT
                         int lf = 0;
@@ -817,7 +817,7 @@ public class TIFFImageEncoder extends Im
                             bpixels[lf++] = (byte)((value & 0xff000000) >>> 24);
                             bpixels[lf++] = (byte)((value & 0x00ff0000) >>> 16);
                             bpixels[lf++] = (byte)((value & 0x0000ff00) >>> 8);
-                            bpixels[lf++] = (byte)( value & 0x000000ff);
+                            bpixels[lf++] = (byte)(value & 0x000000ff);
                         }
                     }
                     if (compression == CompressionValue.NONE) {
@@ -1263,7 +1263,7 @@ public class TIFFImageEncoder extends Im
     // stored in 2 bytes.
     private void writeUnsignedShort(int s) throws IOException {
         output.write((s & 0xff00) >>> 8);
-        output.write( s & 0x00ff);
+        output.write(s & 0x00ff);
     }
 
     /**

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderEMF.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderEMF.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderEMF.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderEMF.java Tue Feb 11 18:39:20 2014
@@ -64,10 +64,10 @@ public class PreloaderEMF extends Abstra
         ImageInputStream in = ImageUtil.needImageInputStream(src);
         byte[] header = getHeader(in, EMF_SIG_LENGTH);
         boolean supported
-            = ( (header[SIGNATURE_OFFSET + 0] == (byte) 0x20)
+            = ((header[SIGNATURE_OFFSET + 0] == (byte) 0x20)
             && (header[SIGNATURE_OFFSET + 1] == (byte) 0x45)
             && (header[SIGNATURE_OFFSET + 2] == (byte) 0x4D)
-            && (header[SIGNATURE_OFFSET + 3] == (byte) 0x46) );
+            && (header[SIGNATURE_OFFSET + 3] == (byte) 0x46));
 
         if (supported) {
             ImageInfo info = new ImageInfo(uri, "image/emf");

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java Tue Feb 11 18:39:20 2014
@@ -198,7 +198,7 @@ public class Any2LsRGBRed extends Abstra
             // lead to out of range values.
             ColorModel srcBICM = srcCM;
             WritableRaster srcWr;
-            if ( srcCM.hasAlpha() && srcCM.isAlphaPremultiplied() ) {
+            if (srcCM.hasAlpha() && srcCM.isAlphaPremultiplied()) {
                 Rectangle wrR = wr.getBounds();
                 SampleModel sm = srcCM.createCompatibleSampleModel
                     (wrR.width, wrR.height);

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -149,10 +149,10 @@ public class Any2sRGBRed extends Abstrac
             while (sp < end) {
                 pix = pixels[sp];
                 pixels[sp] =
-                    ((     pix      & 0xFF000000) |
+                    ((pix & 0xFF000000) |
                      (lut[(pix >>> 16) & 0xFF] << 16) |
                      (lut[(pix >>> 8) & 0xFF] << 8) |
-                     (lut[(pix     ) & 0xFF]    ));
+                     (lut[pix & 0xFF]));
                 sp++;
             }
         }

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/color/ICCColorSpaceWithIntent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/color/ICCColorSpaceWithIntent.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/color/ICCColorSpaceWithIntent.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/color/ICCColorSpaceWithIntent.java Tue Feb 11 18:39:20 2014
@@ -85,7 +85,7 @@ public class ICCColorSpaceWithIntent ext
         case SATURATION:
             return saturationToRGB(values);
         default:
-            throw new RuntimeException("invalid intent:" + intent );
+            throw new RuntimeException("invalid intent:" + intent);
         }
     }
 

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java Tue Feb 11 18:39:20 2014
@@ -434,14 +434,14 @@ public class PSTilingPattern {
         return
             0
             ^ patternType
-            ^ ( ( xUID != null ) ? xUID.hashCode() : 0 )
-            ^ ( ( paintProc != null ) ? paintProc.hashCode() : 0 )
-            ^ ( ( bBox != null ) ? bBox.hashCode() : 0 )
+            ^ ((xUID != null) ? xUID.hashCode() : 0)
+            ^ ((paintProc != null) ? paintProc.hashCode() : 0)
+            ^ ((bBox != null) ? bBox.hashCode() : 0)
             ^ new Double(xStep).hashCode()
             ^ new Double(yStep).hashCode()
             ^ paintType
             ^ tilingType
-            ^ ( ( texture != null ) ? texture.hashCode() : 0 );
+            ^ ((texture != null) ? texture.hashCode() : 0);
     }
 
     /**
@@ -452,7 +452,7 @@ public class PSTilingPattern {
         if (pattern == null) {
             return false;
         }
-        if ( !(pattern instanceof PSTilingPattern)) {
+        if (!(pattern instanceof PSTilingPattern)) {
             return false;
         }
         if (this == pattern) {
@@ -466,7 +466,7 @@ public class PSTilingPattern {
 
         TexturePaint patternTexture = patternObj.getTexturePaint();
 
-        if ( ((patternTexture == null) && (texture != null))
+        if (((patternTexture == null) && (texture != null))
              || ((patternTexture != null) && (texture == null))) {
             return false;
         }

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=1567280&r1=1567279&r2=1567280&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:39:20 2014
@@ -160,7 +160,7 @@ public class Base64DecodeStream extends 
 
         out_buffer[0] = (byte)((a << 2) | (b >>> 4));
         out_buffer[1] = (byte)((b << 4) | (c >>> 2));
-        out_buffer[2] = (byte)((c << 6) |  d     );
+        out_buffer[2] = (byte)((c << 6) |  d);
 
         if (decode_buffer[3] != '=') {
             // All three bytes are good.

Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java?rev=1567280&r1=1567279&r2=1567280&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java Tue Feb 11 18:39:20 2014
@@ -229,7 +229,7 @@ public class XMPHandler extends DefaultH
                     } else {
                         String res = atts.getValue(XMPConstants.RDF_NAMESPACE,
                                 "resource");
-                        if ( res != null ) {
+                        if (res != null) {
                             try {
                                 URI resource = new URI(res);
                                 getCurrentArray(true).add(resource);



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