Fix few checkstyle errors

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk@1808021 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/batik-anim/src/main/java/org/apache/batik/anim/timing/TimedElement.java b/batik-anim/src/main/java/org/apache/batik/anim/timing/TimedElement.java
index a1c6e75..c116d17 100644
--- a/batik-anim/src/main/java/org/apache/batik/anim/timing/TimedElement.java
+++ b/batik-anim/src/main/java/org/apache/batik/anim/timing/TimedElement.java
@@ -1178,7 +1178,7 @@
                 try {
                     this.min = parseClockValue(min, false);
                 } catch (ParseException ex) {
-                	this.min = 0;
+                    this.min = 0;
                 }
                 if (this.min < 0) {
                     this.min = 0;
@@ -1202,7 +1202,7 @@
                 try {
                     this.max = parseClockValue(max, false);
                 } catch (ParseException ex) {
-                	this.max = INDEFINITE;
+                    this.max = INDEFINITE;
                 }
                 if (this.max < 0) {
                     this.max = 0;
diff --git a/batik-gui-util/src/main/java/org/apache/batik/util/gui/xmleditor/XMLScanner.java b/batik-gui-util/src/main/java/org/apache/batik/util/gui/xmleditor/XMLScanner.java
index 9477b34..bf922cc 100644
--- a/batik-gui-util/src/main/java/org/apache/batik/util/gui/xmleditor/XMLScanner.java
+++ b/batik-gui-util/src/main/java/org/apache/batik/util/gui/xmleditor/XMLScanner.java
@@ -198,7 +198,7 @@
                 end = false;
             } else if (current == ']') {
                 end = true;
-            } else if (current == '>' && end == true) {
+            } else if (current == '>' && end) {
                 return CHARACTER_DATA_CONTEXT;
             }
             nextChar();
diff --git a/batik-script/src/main/java/org/apache/batik/script/ImportInfo.java b/batik-script/src/main/java/org/apache/batik/script/ImportInfo.java
index d8d2b62..925bfb7 100755
--- a/batik-script/src/main/java/org/apache/batik/script/ImportInfo.java
+++ b/batik-script/src/main/java/org/apache/batik/script/ImportInfo.java
@@ -77,7 +77,7 @@
      * This instance is initialized by reading the file
      * identified by 'importFile'.
      */
-    static public ImportInfo getImports() {
+    public static ImportInfo getImports() {
         if (defaultImports == null) 
             defaultImports = readImports();
         return defaultImports;    
diff --git a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/ListBuilder.java b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/ListBuilder.java
index d869b07..8f39a6a 100644
--- a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/ListBuilder.java
+++ b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/ListBuilder.java
@@ -70,4 +70,4 @@
      */
     public void endList() {
     }
-}
\ No newline at end of file
+}
diff --git a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGNumberItem.java b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGNumberItem.java
index f8975dd..d5d4ae0 100644
--- a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGNumberItem.java
+++ b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGNumberItem.java
@@ -67,4 +67,4 @@
             parentList.itemChanged();
         }
     }
-}
\ No newline at end of file
+}
diff --git a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPathSegItem.java b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPathSegItem.java
index f195166..e0c00ea 100644
--- a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPathSegItem.java
+++ b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPathSegItem.java
@@ -159,4 +159,4 @@
         this.y2 = y2;
     }
 
-}
\ No newline at end of file
+}
diff --git a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPointItem.java b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPointItem.java
index 113374d..4b13539 100644
--- a/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPointItem.java
+++ b/batik-svg-dom/src/main/java/org/apache/batik/dom/svg/SVGPointItem.java
@@ -89,4 +89,4 @@
     public SVGPoint matrixTransform(SVGMatrix matrix) {
         return SVGOMPoint.matrixTransform(this, matrix);
     }
-}
\ No newline at end of file
+}
diff --git a/batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/DOMViewer.java b/batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/DOMViewer.java
index 97702ec..21f5725 100644
--- a/batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/DOMViewer.java
+++ b/batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/DOMViewer.java
@@ -433,11 +433,11 @@
         }
 
         public boolean canEdit(Element el) {
-            if (panel == null || panel.document == null || true
-                    /*|| panel.document.getDocumentElement() != el*/) {
+//            if (panel == null || panel.document == null || true
+//                    /*|| panel.document.getDocumentElement() != el*/) {
                 return true;
-            }
-            return false;
+//            }
+//            return false;
         }
     }
 
diff --git a/batik-svggen/src/main/java/org/apache/batik/svggen/SVGGraphics2D.java b/batik-svggen/src/main/java/org/apache/batik/svggen/SVGGraphics2D.java
index fe3dd8a..1280631 100644
--- a/batik-svggen/src/main/java/org/apache/batik/svggen/SVGGraphics2D.java
+++ b/batik-svggen/src/main/java/org/apache/batik/svggen/SVGGraphics2D.java
@@ -1463,10 +1463,9 @@
      */
     private boolean isUnderline(AttributedCharacterIterator ati) {
         Object attr = ati.getAttribute(TextAttribute.UNDERLINE);
-        if (TextAttribute.UNDERLINE_ON.equals(attr)) return true;
+        return TextAttribute.UNDERLINE_ON.equals(attr);
         // What to do about UNDERLINE_LOW_*?  Right now we don't
         // draw them since we can't really model them...
-        else return false;
     }
 
     /** Return true if the AttributedCharacterIterator is striked
diff --git a/batik-svgrasterizer/src/main/java/org/apache/batik/apps/rasterizer/DefaultSVGConverterController.java b/batik-svgrasterizer/src/main/java/org/apache/batik/apps/rasterizer/DefaultSVGConverterController.java
index b60bccb..6589e11 100644
--- a/batik-svgrasterizer/src/main/java/org/apache/batik/apps/rasterizer/DefaultSVGConverterController.java
+++ b/batik-svgrasterizer/src/main/java/org/apache/batik/apps/rasterizer/DefaultSVGConverterController.java
@@ -84,4 +84,4 @@
     public void onSourceTranscodingSuccess(SVGConverterSource source,
                                            File dest){
     }
-}
\ No newline at end of file
+}
diff --git a/batik-swing/src/main/java/org/apache/batik/swing/gvt/JGVTComponent.java b/batik-swing/src/main/java/org/apache/batik/swing/gvt/JGVTComponent.java
index fb99b8c..1950aea 100644
--- a/batik-swing/src/main/java/org/apache/batik/swing/gvt/JGVTComponent.java
+++ b/batik-swing/src/main/java/org/apache/batik/swing/gvt/JGVTComponent.java
@@ -1187,12 +1187,12 @@
         public void mouseMoved(MouseEvent e) {
             selectInteractor(e);
             if (interactor != null) {
-            	// because the mouseDragged event doesn't seem to be generated on OSX when ctrl is held down
-            	if (Platform.isOSX &&
-            		interactor instanceof AbstractZoomInteractor)
-            		mouseDragged(e);
-            	else
-            		interactor.mouseMoved(e);
+                // because the mouseDragged event doesn't seem to be generated on OSX when ctrl is held down
+                if (Platform.isOSX &&
+                    interactor instanceof AbstractZoomInteractor)
+                    mouseDragged(e);
+                else
+                    interactor.mouseMoved(e);
                 deselectInteractor();
             } else if (eventDispatcher != null) {
                 dispatchMouseMoved(e);
diff --git a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.java b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.java
index 73035dc..487f208 100644
--- a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.java
+++ b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.java
@@ -80,7 +80,7 @@
      * Read the next short (2 bytes) value in the DataInputStream.
      */
     protected short readShort(DataInputStream is) throws IOException {
-        byte js[] = new byte[ 2 ];
+        byte[] js = new byte[ 2 ];
         is.readFully(js);
         int iTemp = ((0xff) & js[ 1 ] ) << 8;
         short i = (short)(0xffff & iTemp);
@@ -92,7 +92,7 @@
      * Read the next int (4 bytes) value in the DataInputStream.
      */
     protected int readInt( DataInputStream is) throws IOException {
-        byte js[] = new byte[ 4 ];
+        byte[] js = new byte[ 4 ];
         is.readFully(js);
         int i = ((0xff) & js[ 3 ] ) << 24;
         i |= ((0xff) & js[ 2 ] ) << 16;
diff --git a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.java b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.java
index 45960c8..3066535 100644
--- a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.java
+++ b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.java
@@ -557,7 +557,7 @@
                 resizeImageBounds((int)(dx + widthDst), (int)(dy + heightDst));                
 
                 int len = 2*recSize - 22;
-                byte bitmap[] = new byte[len];                    
+                byte[] bitmap = new byte[len];
                 for (int i = 0; i < len; i++) bitmap[i] = is.readByte();
             }
             break;                                                
diff --git a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
index 141d62f..cd8c010 100644
--- a/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
+++ b/batik-transcoder/src/main/java/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
@@ -641,7 +641,7 @@
                     int dx = (int)(readShort( is ) * xSign * scaleXY);  
                     
                     int len = 2*recSize - 22;
-                    byte bitmap[] = new byte[len];                    
+                    byte[] bitmap = new byte[len];
                     for (int i = 0; i < len; i++) bitmap[i] = is.readByte();
                     
                     mr = new MetaRecord.ByteRecord(bitmap);
diff --git a/checkstyle.xml b/checkstyle.xml
index b5328a7..6d35236 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -2,173 +2,163 @@
 <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
 <module name="Checker">
   <property name="severity" value="warning"/>
-  
-<!--   <module name="FileTabCharacter">
+
+  <module name="FileTabCharacter">
     <property name="severity" value="error"/>
     <property name="eachLine" value="true"/>
   </module>
-  
-  <module name="NewlineAtEndOfFile"/> -->
-  
+
+ <module name="NewlineAtEndOfFile">
+	<property name="lineSeparator" value="lf" />
+  </module>
+
   <module name="RegexpHeader">
     <property name="severity" value="error"/>
     
     <property name="header" value="\/\*\n\n   Licensed to the Apache Software Foundation \(ASF\) under one or more\n   contributor license agreements.  See the NOTICE file distributed with\n   this work for additional information regarding copyright ownership.\n   The ASF licenses this file to You under the Apache License, Version 2.0\n   \(the &quot;License&quot;\); you may not use this file except in compliance with\n   the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an &quot;AS IS&quot; BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n \*\/\n"/>    
   </module>
-  
-  <!-- <module name="RegexpSingleline">
+ 
+<!--   <module name="RegexpSingleline">
     <property name="format" value="\s+$"/>
     <property name="message" value="Line has trailing spaces."/>
   </module>
-  
+
   <module name="RegexpSingleline">
     <property name="format" value="@author"/>
     <property name="message" value="Use of @author javadoc keyword is prohibited."/>
-  </module>
-  
+  </module> -->
 
-  
   <module name="SuppressionCommentFilter">
     <property name="offCommentFormat" value="CSOFF\: ([\w\|]+)"/>
     <property name="onCommentFormat" value="CSON\: ([\w\|]+)"/>
     <property name="checkFormat" value="$1"/>
-  </module> -->
-  
+  </module>
 
-   <module name="SuppressionFilter">
+  <module name="SuppressionFilter">
     <property name="file" value="checkstylesuppressions.xml"/>
   </module>
-  
-   <module name="TreeWalker">
-    
-    <!--<module name="LineLength">
+
+  <module name="TreeWalker">
+
+<!--     <module name="LineLength">
       <property name="max" value="120"/>
-    </module>   
-    
-    <module name="AnnotationUseStyle"/>    
-    
-    <module name="ArrayTypeStyle"/>    
-    
-    <module name="AvoidNestedBlocks"/>    
-    
+    </module> 
+
+    <module name="AnnotationUseStyle"/>-->
+
+    <module name="ArrayTypeStyle"/>
+
+    <!-- <module name="AvoidNestedBlocks"/> 
+
     <module name="AvoidStarImport">
       <property name="severity" value="error"/>
     </module>
-    
+
     <module name="ConstantName">
-      <property name="format" value="^[A-Z](_?[A-Z0-9]+)*|log|is(Debug|Trace)Enabled$"/>
+      <property name="format" value="^([A-Z](_?[A-Z0-9]+)*)|(log)$"/>
     </module>
-    
+
     <module name="DefaultComesLast"/>
-    
+
     <module name="EmptyBlock">
       <property name="tokens" value="LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
-      <property name="option" value="text"/>                                                                    
+      <property name="option" value="text"/>
     </module>
-    
+
     <module name="EmptyStatement"/>
-    
+
     <module name="EqualsHashCode"/>
-    
+
     <module name="ExplicitInitialization"/>
-    
+
     <module name="FileContentsHolder"/>
-    
+
     <module name="FinalClass"/>
-    
-    <module name="GenericWhitespace"/>
-    
-    <module name="HideUtilityClassConstructor"/>
-    
-    <module name="IllegalImport"/>
-    
+
+    <module name="GenericWhitespace"/> 
+
+    <module name="HideUtilityClassConstructor"/>-->
+
+    <module name="IllegalImport"/><!--
+
     <module name="ImportOrder">
       <property name="groups" value="java,javax,org,org.apache,org.apache.batik,org.apache.xmlgraphics,org.apache.fop,com"/>
       <property name="separated" value="true"/>
     </module>
-    
-    <module name="InnerAssignment">
-      <property name="tokens" 
-        value="BAND_ASSIGN,BOR_ASSIGN,BSR_ASSIGN,BXOR_ASSIGN,DIV_ASSIGN,MINUS_ASSIGN,MOD_ASSIGN,PLUS_ASSIGN,SL_ASSIGN,SR_ASSIGN,STAR_ASSIGN"/>
-    </module>
-    
-    <module name="LeftCurly"/>
-    
-    <module name="LocalFinalVariableName"/>
-    
-    <module name="LocalVariableName"/>
-    
-    <module name="MemberName"/>
-    
-    <module name="MethodName"/>
-    
-    <module name="MethodParamPad"/>
-    
-    <module name="MissingSwitchDefault"/>
-    
-    <module name="ModifierOrder"/>
-    
-    <module name="MultipleVariableDeclarations"/>
-    
-    <module name="NeedBraces"/>
-    
-    <module name="NoWhitespaceAfter">
-      <property name="allowLineBreaks" value="false"/>
-      <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
-    </module>
-    
-    <module name="NoWhitespaceBefore"/>
-    
-    <module name="OneStatementPerLine"/>
-    
-    <module name="OperatorWrap"/>
-    
-    <module name="PackageName"/>
-    
-    <module name="ParameterName"/>
-    
-    <module name="ParenPad"/>
-    
-    
-    
-    <module name="RedundantModifier"/>
-    
-    <module name="RightCurly"/>
-    
-    <module name="SimplifyBooleanExpression"/>
-    
-    <module name="SimplifyBooleanReturn"/>
-    
-    <module name="StaticVariableName"/>
-    
-    <module name="TypeName"/>
-    
-    <module name="TypecastParenPad">
-      <property name="tokens" value="RPAREN,TYPECAST"/>
-    </module>
-    
-    <module name="UnusedImports"/>
-    
-    <module name="UpperEll"/>
-    
+
     <module name="WhitespaceAfter">
-      <property name="tokens" value="COMMA,SEMI"/>                                                              
+      <property name="tokens" value="COMMA,SEMI"/> 
     </module>
-    
+
     <module name="WhitespaceAround">
       <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
       <property name="ignoreEnhancedForColon" value="false"/>
     </module>
-    <module name="JavadocMethod">
-      <property name="allowMissingJavadoc" value="true"/>
-      <property name="allowMissingParamTags" value="true"/>
-      <property name="allowMissingReturnTag" value="true"/>
-      <property name="allowMissingThrowsTags" value="true"/>
-    </module>-->
     
+ <module name="InnerAssignment">
+      <property name="tokens" 
+        value="BAND_ASSIGN,BOR_ASSIGN,BSR_ASSIGN,BXOR_ASSIGN,DIV_ASSIGN,MINUS_ASSIGN,MOD_ASSIGN,PLUS_ASSIGN,SL_ASSIGN,SR_ASSIGN,STAR_ASSIGN"/>
+    </module>
+
+    <module name="LeftCurly"/>
+
+    <module name="LocalFinalVariableName"/>
+
+    <module name="LocalVariableName"/>
+
+    <module name="MemberName"/> 
+
+    <module name="MethodName"/>
+
+    <module name="MethodParamPad"/>
+
+    <module name="MissingSwitchDefault"/>-->
+
+    <module name="ModifierOrder"/><!--
+
+    <module name="MultipleVariableDeclarations"/>
+
+    <module name="NeedBraces"/>
+
+    <module name="NoWhitespaceAfter">
+      <property name="allowLineBreaks" value="false"/>
+      <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
+    </module>
+
+    <module name="NoWhitespaceBefore"/>
+
+    <module name="OneStatementPerLine"/>
+
+    <module name="OperatorWrap"/>-->
+
+    <module name="PackageName"/>
+
+    <!-- <module name="ParameterName"/>
+
+    <module name="ParenPad"/> -->
+
     <module name="RedundantImport"/>
-    
+
+    <!-- <module name="RedundantModifier"/>
+
+    <module name="RightCurly"/> -->
+
+    <module name="SimplifyBooleanExpression"/>
+
+    <module name="SimplifyBooleanReturn"/>
+
+    <!-- <module name="StaticVariableName"/> 
+
+    <module name="TypeName"/>-->
+
+    <module name="TypecastParenPad">
+      <property name="tokens" value="RPAREN,TYPECAST"/>
+    </module><!--
+
+    <module name="UnusedImports"/> -->
+
+    <module name="UpperEll"/>    
+
   </module> 
-  
 
 </module>
diff --git a/contrib/scroll/ScrollExample.java b/contrib/scroll/ScrollExample.java
index 0a98fc3..609eea2 100644
--- a/contrib/scroll/ScrollExample.java
+++ b/contrib/scroll/ScrollExample.java
@@ -43,7 +43,7 @@
 {
     
     /** Command-line start */
-    public static void main(String args[])
+    public static void main(String[] args)
     {
         if(args.length != 1)
         {