You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2014/07/14 19:29:03 UTC

svn commit: r1610462 - in /maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle: AbstractCheckstyleReport.java CheckstyleViolationCheckMojo.java IconTool.java

Author: hboutemy
Date: Mon Jul 14 17:29:02 2014
New Revision: 1610462

URL: http://svn.apache.org/r1610462
Log:
fixed errors reported by Checkstyle

Modified:
    maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java
    maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
    maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/IconTool.java

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java?rev=1610462&r1=1610461&r2=1610462&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java Mon Jul 14 17:29:02 2014
@@ -385,11 +385,11 @@ public abstract class AbstractCheckstyle
     /**
      * The Plugin Descriptor
      */
-    @Parameter( defaultValue= "${plugin}", readonly = true )
+    @Parameter( defaultValue = "${plugin}", readonly = true )
     private PluginDescriptor plugin;
 
     // remove when requiring Maven 3.x, just use #plugin 
-    @Parameter( defaultValue= "${mojoExecution}", readonly = true )
+    @Parameter( defaultValue = "${mojoExecution}", readonly = true )
     private MojoExecution mojoExecution;
     
     /**

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java?rev=1610462&r1=1610461&r2=1610462&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java Mon Jul 14 17:29:02 2014
@@ -315,11 +315,11 @@ public class CheckstyleViolationCheckMoj
     /**
      * The Plugin Descriptor
      */
-    @Parameter( defaultValue= "${plugin}", readonly = true )
+    @Parameter( defaultValue = "${plugin}", readonly = true )
     private PluginDescriptor plugin;
 
     // remove when requiring Maven 3.x, just use #plugin 
-    @Parameter( defaultValue= "${mojoExecution}", readonly = true )
+    @Parameter( defaultValue = "${mojoExecution}", readonly = true )
     private MojoExecution mojoExecution;
 
     /**
@@ -433,7 +433,8 @@ public class CheckstyleViolationCheckMoj
     /**
      * dump file for inlined checkstyle rules 
      */
-    @Parameter( property = "checkstyle.output.rules.file", defaultValue = "${project.build.directory}/checkstyle-rules.xml" )
+    @Parameter( property = "checkstyle.output.rules.file",
+                    defaultValue = "${project.build.directory}/checkstyle-rules.xml" )
     private File rulesFiles;
 
     private ByteArrayOutputStream stringOutputStream;
@@ -489,7 +490,8 @@ public class CheckstyleViolationCheckMoj
                         .setResources( resources )
                         .setStringOutputStream( stringOutputStream ).setSuppressionsLocation( suppressionsLocation )
                         .setTestSourceDirectory( testSourceDirectory ).setConfigLocation( configLocation )
-                        .setConfigurationArtifacts( collectArtifacts( "config" ) ).setPropertyExpansion( propertyExpansion )
+                        .setConfigurationArtifacts( collectArtifacts( "config" ) )
+                        .setPropertyExpansion( propertyExpansion )
                         .setHeaderLocation( headerLocation ).setLicenseArtifacts( collectArtifacts( "license" ) )
                         .setCacheFile( cacheFile ).setSuppressionsFileExpression( suppressionsFileExpression )
                         .setEncoding( encoding ).setPropertiesLocation( propertiesLocation );
@@ -582,7 +584,8 @@ public class CheckstyleViolationCheckMoj
             {
                 if ( logViolationsToConsole )
                 {
-                    final String column = xpp.getAttributeValue( "", "column" ) == null ? "n/a" : xpp.getAttributeValue( "", "column" );
+                    final String column =
+                        xpp.getAttributeValue( "", "column" ) == null ? "n/a" : xpp.getAttributeValue( "", "column" );
                     final String logMessage = file + '[' + xpp.getAttributeValue( "", "line" ) + ':' + column + "] "
                         + xpp.getAttributeValue( "", "message" );
                     if ( "info".equals( xpp.getAttributeValue( "", "severity" ) ) )

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/IconTool.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/IconTool.java?rev=1610462&r1=1610461&r2=1610462&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/IconTool.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/IconTool.java Mon Jul 14 17:29:02 2014
@@ -30,16 +30,16 @@ import org.apache.maven.doxia.sink.Sink;
  */
 public class IconTool
 {
-    public final static String INFO = "info";
+    public static final String INFO = "info";
 
-    public final static String WARNING = "warning";
+    public static final String WARNING = "warning";
 
-    public final static String ERROR = "error";
+    public static final String ERROR = "error";
 
-    public final static int NO_TEXT = 0;
-    public final static int TEXT_SIMPLE = 1;
-    public final static int TEXT_TITLE = 2;
-    public final static int TEXT_ABBREV = 3;
+    public static final int NO_TEXT = 0;
+    public static final int TEXT_SIMPLE = 1;
+    public static final int TEXT_TITLE = 2;
+    public static final int TEXT_ABBREV = 3;
 
     private final Sink sink;
 
@@ -51,6 +51,10 @@ public class IconTool
         this.bundle = bundle;
     }
 
+    /**
+     * Render a simple icon of given level.
+     * @param level one of <code>INFO</code>, <code>WARNING</code> or <code>ERROR</code> constants
+     */
     public void iconSeverity( String level )
     {
         sink.figure();
@@ -58,6 +62,12 @@ public class IconTool
         sink.figure_();
     }
 
+    /**
+     * Render an icon of given level with associated text.
+     * @param level one of <code>INFO</code>, <code>WARNING</code> or <code>ERROR</code> constants
+     * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
+     * <code>TEXT_ABBREV</code> constants
+     */
     public void iconSeverity( String level, int textType )
     {
         sink.figure();
@@ -72,31 +82,55 @@ public class IconTool
         }
     }
 
+    /**
+     * Render an info icon.
+     */
     public void iconInfo()
     {
         iconSeverity( INFO );
     }
 
+    /**
+     * Render an info icon with associated text.
+     * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
+     * <code>TEXT_ABBREV</code> constants
+     */
     public void iconInfo( int textType )
     {
         iconSeverity( INFO, textType );
     }
 
+    /**
+     * Render a warning icon.
+     */
     public void iconWarning()
     {
         iconSeverity( WARNING );
     }
 
+    /**
+     * Render a warning icon with associated text.
+     * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
+     * <code>TEXT_ABBREV</code> constants
+     */
     public void iconWarning( int textType )
     {
         iconSeverity( WARNING, textType );
     }
 
+    /**
+     * Render an error icon.
+     */
     public void iconError()
     {
         iconSeverity( ERROR );
     }
 
+    /**
+     * Render an error icon with associated text.
+     * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
+     * <code>TEXT_ABBREV</code> constants
+     */
     public void iconError( int textType )
     {
         iconSeverity( ERROR, textType );