Author: florianh
Date: Tue Sep 20 20:17:04 2011
New Revision: 1173332

URL: http://svn.apache.org/viewvc?rev=1173332&view=rev
Log:
* modified jspwiki-checkstyle.xml to be compatible with CheckStyle 5.x
* corrected a few things CheckStyle was nagging about

Modified:
    incubator/jspwiki/trunk/.project
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/doc/eclipse/jspwiki-checkstyle.xml
    
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractActionBean.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiTagBase.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/util/UtilJ2eeCompat.java
    
incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java

Modified: incubator/jspwiki/trunk/.project
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/.project?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- incubator/jspwiki/trunk/.project (original)
+++ incubator/jspwiki/trunk/.project Tue Sep 20 20:17:04 2011
@@ -41,7 +41,7 @@
                        </arguments>
                </buildCommand>
                <buildCommand>
-                       
<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
@@ -52,6 +52,6 @@
                
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
                <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
                <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
-               
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>

Modified: incubator/jspwiki/trunk/ChangeLog
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Tue Sep 20 20:17:04 2011
@@ -1,3 +1,9 @@
+2011-09-20  Florian Holeczek <[email protected]>
+
+        * no version bump
+        * modified jspwiki-checkstyle.xml to be compatible with CheckStyle 5.x
+        * corrected a few things CheckStyle was nagging about
+
 2011-09-18  Harry Metske <[email protected]>
 
         * 3.0.0-svn-233

Modified: incubator/jspwiki/trunk/doc/eclipse/jspwiki-checkstyle.xml
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/doc/eclipse/jspwiki-checkstyle.xml?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- incubator/jspwiki/trunk/doc/eclipse/jspwiki-checkstyle.xml (original)
+++ incubator/jspwiki/trunk/doc/eclipse/jspwiki-checkstyle.xml Tue Sep 20 
20:17:04 2011
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    This configuration file was written by the eclipse-cs plugin configuration 
editor
--->
-<!--
     Checkstyle-Configuration: JSPWiki Coding Style
     Description: none
 -->
@@ -10,12 +7,12 @@
 <module name="Checker">
     <property name="severity" value="warning"/>
     <module name="TreeWalker">
+        <!-- Fields should always start with "m_" -->
         <module name="MemberName">
-            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" 
value="Fields should always start with &quot;m_&quot;"/>
             <property name="format" value="^m_[a-z][a-zA-Z0-9]*$"/>
         </module>
+        <!-- Static variables shall start with "c_" (except for "log") -->
         <module name="StaticVariableName">
-            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" 
value="Static variables shall start with &quot;c_&quot; (except for 
&quot;log&quot;)"/>
             <property name="format" value="^log$|^c_[a-z][a-zA-Z0-9]*$"/>
         </module>
         <module name="LeftCurly">
@@ -35,9 +32,6 @@
         <module name="ParameterName"/>
         <module name="TypeName"/>
         <module name="LocalVariableName"/>
-        <module name="TabCharacter">
-            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" 
value="Tabs are evil"/>
-        </module>
         <module name="ModifierOrder"/>
         <module name="CovariantEquals"/>
         <module name="DefaultComesLast"/>
@@ -80,11 +74,9 @@
             <property name="excludedClasses" value="^.*Release$"/>
         </module>
         <module name="UpperEll"/>
-        <module name="j2ee.FinalStatic"/>
-        <module name="RequiredRegexp">
-            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" 
value="No ASF preamble"/>
-            <property name="format" value="^.*Licensed to the Apache Software 
Foundation.*$"/>
-        </module>
+        <!-- This is not supported anymore by Checkstyle 5.x. Isn't really 
needed anyway, so commenting it out.
+            <module name="j2ee.FinalStatic"/>
+        -->
         <module name="JavadocType">
             <property name="scope" value="package"/>
         </module>
@@ -94,12 +86,19 @@
         <module name="JavadocMethod">
             <property name="scope" value="protected"/>
         </module>
-        <module name="GenericIllegalRegexp">
-            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" 
value="@author tags should not be used"/>
-            <property name="severity" value="info"/>
-            <property name="format" value="^.*@author.*$"/>
-        </module>
     </module>
+    <!-- @author tags should not be used -->
+    <module name="RegexpSingleline">
+        <property name="format" value="^.*@author.*$"/>
+    </module>
+    <!-- Ensure ASF preamble -->
+    <module name="RegexpMultiline">
+        <property name="format" value="Licensed to the Apache Software 
Foundation"/>
+        <property name="minimum" value="1"/>
+        <property name="maximum" value="5"/>
+    </module>
+    <module name="FileTabCharacter"/>
     <module name="NewlineAtEndOfFile"/>
-    <module name="PackageHtml"/>
+    <!-- Every Java package should have its Javadoc file -->    
+    <module name="JavadocPackage"/>
 </module>

Modified: 
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractActionBean.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractActionBean.java?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractActionBean.java 
(original)
+++ 
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractActionBean.java 
Tue Sep 20 20:17:04 2011
@@ -65,7 +65,7 @@ abstract class AbstractActionBean implem
      */
     public final void setContext( ActionBeanContext context )
     {
-        m_context = ((WikiActionBeanContext) context);
+        m_context = (WikiActionBeanContext) context;
     }
 
 }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiTagBase.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiTagBase.java?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiTagBase.java 
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiTagBase.java Tue 
Sep 20 20:17:04 2011
@@ -202,7 +202,7 @@ public abstract class WikiTagBase
      */
     public void setId(String id)
     {
-               m_id = ( TextUtil.replaceEntities( id ) );
+               m_id = TextUtil.replaceEntities( id );
        }
 
 }

Modified: 
incubator/jspwiki/trunk/src/java/org/apache/wiki/util/UtilJ2eeCompat.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/util/UtilJ2eeCompat.java?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/util/UtilJ2eeCompat.java 
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/util/UtilJ2eeCompat.java 
Tue Sep 20 20:17:04 2011
@@ -83,7 +83,7 @@ public class UtilJ2eeCompat
      */
     public static boolean useOutputStream( String serverInfo, Boolean 
boolInitialize )
     {
-        if( (useOutputStreamValue == null) | (boolInitialize) )
+        if( (useOutputStreamValue == null) | boolInitialize )
         {
             initCompatibilityOptions( serverInfo );
         }

Modified: 
incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java?rev=1173332&r1=1173331&r2=1173332&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java 
(original)
+++ 
incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java 
Tue Sep 20 20:17:04 2011
@@ -89,9 +89,8 @@ public abstract class AbstractRPCHandler
         // Transform UTC into local time.
         Calendar cal = Calendar.getInstance();
         cal.setTime( since );
-        cal.add( Calendar.MILLISECOND, 
-                 (cal.get( Calendar.ZONE_OFFSET ) + 
-                  (cal.getTimeZone().inDaylightTime( since ) ? cal.get( 
Calendar.DST_OFFSET ) : 0 )) );
+        cal.add( Calendar.MILLISECOND, cal.get( Calendar.ZONE_OFFSET ) + 
+                  (cal.getTimeZone().inDaylightTime( since ) ? cal.get( 
Calendar.DST_OFFSET ) : 0 ) );
 
         for( WikiPage page : pages )
         {


Reply via email to