Author: epunzalan
Date: Sun Mar 26 19:17:01 2006
New Revision: 389011

URL: http://svn.apache.org/viewcvs?rev=389011&view=rev
Log:
Applied code formatting

Modified:
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.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/Locator.java
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/ReportResource.java
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
 Sun Mar 26 19:17:01 2006
@@ -16,6 +16,35 @@
  * limitations under the License.
  */
 
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.ConfigurationLoader;
+import com.puppycrawl.tools.checkstyle.DefaultLogger;
+import com.puppycrawl.tools.checkstyle.ModuleFactory;
+import com.puppycrawl.tools.checkstyle.PackageNamesLoader;
+import com.puppycrawl.tools.checkstyle.PropertiesExpander;
+import com.puppycrawl.tools.checkstyle.XMLLogger;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.FilterSet;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader;
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.context.Context;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.apache.velocity.exception.VelocityException;
+import org.codehaus.doxia.site.renderer.SiteRenderer;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringInputStream;
+import org.codehaus.plexus.util.StringOutputStream;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.velocity.VelocityComponent;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -36,39 +65,9 @@
 import java.util.Properties;
 import java.util.ResourceBundle;
 
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.reporting.AbstractMavenReport;
-import org.apache.maven.reporting.MavenReportException;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.context.Context;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.exception.VelocityException;
-import org.codehaus.doxia.site.renderer.SiteRenderer;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringInputStream;
-import org.codehaus.plexus.util.StringOutputStream;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.velocity.VelocityComponent;
-
-import com.puppycrawl.tools.checkstyle.Checker;
-import com.puppycrawl.tools.checkstyle.ConfigurationLoader;
-import com.puppycrawl.tools.checkstyle.DefaultLogger;
-import com.puppycrawl.tools.checkstyle.ModuleFactory;
-import com.puppycrawl.tools.checkstyle.PackageNamesLoader;
-import com.puppycrawl.tools.checkstyle.PropertiesExpander;
-import com.puppycrawl.tools.checkstyle.XMLLogger;
-import com.puppycrawl.tools.checkstyle.api.AuditListener;
-import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
-import com.puppycrawl.tools.checkstyle.api.Configuration;
-import com.puppycrawl.tools.checkstyle.api.FilterSet;
-import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
-import com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader;
-
 /**
- * Perform checkstyle analysis, and generate report on violations. 
- * 
+ * Perform checkstyle analysis, and generate report on violations.
+ *
  * @author <a href="mailto:[EMAIL PROTECTED]">Emmanuel Venisse</a>
  * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a>
  * @author <a href="mailto:[EMAIL PROTECTED]">Joakim Erdfelt</a>
@@ -106,33 +105,33 @@
 
     /**
      * Specifies if the Rules summary should be enabled or not.
-     * 
+     *
      * @parameter expression="${checkstyle.enable.rules.summary}"
-     *            default-value="true"
+     * default-value="true"
      */
     private boolean enableRulesSummary;
 
     /**
      * Specifies if the Severity summary should be enabled or not.
-     * 
+     *
      * @parameter expression="${checkstyle.enable.severity.summary}"
-     *            default-value="true"
+     * default-value="true"
      */
     private boolean enableSeveritySummary;
 
     /**
      * Specifies if the Files summary should be enabled or not.
-     * 
+     *
      * @parameter expression="${checkstyle.enable.files.summary}"
-     *            default-value="true"
+     * default-value="true"
      */
     private boolean enableFilesSummary;
 
     /**
      * Specifies if the Files summary should be enabled or not.
-     * 
+     *
      * @parameter expression="${checkstyle.enable.rss}"
-     *            default-value="true"
+     * default-value="true"
      */
     private boolean enableRSS;
 
@@ -152,36 +151,36 @@
     private String excludes;
 
     /**
-     * <p>
+     * <p/>
      * Specifies the location of the XML configuration to use.
      * </p>
-     * 
-     * <p>
+     * <p/>
+     * <p/>
      * Potential values are a filesystem path, a URL, or a classpath
      * resource.  This parameter expects that the contents of the location
-     * conform to the xml format (Checkstyle 
-     * <a href="http://checkstyle.sourceforge.net/config.html#Modules";>Checker 
+     * conform to the xml format (Checkstyle
+     * <a href="http://checkstyle.sourceforge.net/config.html#Modules";>Checker
      * module</a>) configuration of rulesets.
      * </p>
-     * 
-     * <p>
-     * This parameter is resolved as resource, URL, then file.  
-     * If successfully resolved, the contents of the configuration is copied 
into the 
+     * <p/>
+     * <p/>
+     * This parameter is resolved as resource, URL, then file.
+     * If successfully resolved, the contents of the configuration is copied 
into the
      * <code>${project.build.directory}/checkstyle-configuration.xml</code>
      * file before being passed to checkstyle as a configuration.
      * </p>
-     * 
-     * <p>
+     * <p/>
+     * <p/>
      * There are 4 predefined rulesets.
      * </p>
-     * 
+     * <p/>
      * <ul>
      * <li><code>config/sun_checks.xml</code>: Sun Checks.</li>
      * <li><code>config/turbine_checks.xml</code>: Turbine Checks.</li>
      * <li><code>config/avalon_checks.xml</code>: Avalon Checks.</li>
      * <li><code>config/maven_checks.xml</code>: Maven Source Checks.</li>
      * </ul>
-     * 
+     *
      * @parameter expression="${checkstyle.config.location}" 
default-value="config/sun_checks.xml"
      */
     private String configLocation;
@@ -197,24 +196,24 @@
     private String format;
 
     /**
-     * <p>
+     * <p/>
      * Specifies the location of the properties file.
      * </p>
-     * 
-     * <p>
-     * This parameter is resolved as URL, File, then resource.  
-     * If successfully resolved, the contents of the properties location is 
copied into the 
+     * <p/>
+     * <p/>
+     * This parameter is resolved as URL, File, then resource.
+     * If successfully resolved, the contents of the properties location is 
copied into the
      * <code>${project.build.directory}/checkstyle-checker.properties</code>
      * file before being passed to checkstyle for loading.
      * </p>
-     * 
-     * <p>
-     * The contents of the <code>propertiesLocation</code> will be made 
-     * available to checkstyle for specifying values for parameters within 
-     * the xml configuration (specified in the <code>configLocation</code> 
+     * <p/>
+     * <p/>
+     * The contents of the <code>propertiesLocation</code> will be made
+     * available to checkstyle for specifying values for parameters within
+     * the xml configuration (specified in the <code>configLocation</code>
      * parameter).
-     * </p> 
-     * 
+     * </p>
+     *
      * @parameter expression="${checkstyle.properties.location}"
      * @since 2.0-beta-2
      */
@@ -238,14 +237,14 @@
 
     /**
      * Allows for specifying raw property expansion information.
-     * 
+     *
      * @parameter
      */
     private String propertyExpansion;
 
     /**
-     * Specifies the location of the License file (a.k.a. the header file) 
-     * that is used by Checkstyle to verify that source code has the 
+     * Specifies the location of the License file (a.k.a. the header file)
+     * that is used by Checkstyle to verify that source code has the
      * correct copyright.
      *
      * @parameter expression="${checkstyle.header.file}" 
default-value="LICENSE.txt"
@@ -278,13 +277,13 @@
     private File useFile;
 
     /**
-     * <p>
+     * <p/>
      * Specifies the location of the suppressions XML file to use.
      * </p>
-     * 
-     * <p>
-     * This parameter is resolved as resource, URL, then file.  
-     * If successfully resolved, the contents of the suppressions XML is 
copied into the 
+     * <p/>
+     * <p/>
+     * This parameter is resolved as resource, URL, then file.
+     * If successfully resolved, the contents of the suppressions XML is 
copied into the
      * <code>${project.build.directory}/checkstyle-supressions.xml</code>
      * file before being passed to checkstyle for loading.
      * </p>
@@ -300,7 +299,7 @@
      * property. This allows using the Checkstyle property your own custom 
checkstyle
      * configuration file when specifying a suppressions file.
      *
-     * @parameter 
+     * @parameter
      * @deprecated Use suppressionsLocation instead.
      */
     private String suppressionsFile;
@@ -309,8 +308,8 @@
      * Specifies the path and filename to save the checkstyle output.  The 
format of the output file is
      * determined by the <code>outputFileFormat</code>
      *
-     * @parameter expression="${checkstyle.output.file}" 
-     *            
default-value="${project.build.directory}/checkstyle-result.xml"
+     * @parameter expression="${checkstyle.output.file}"
+     * default-value="${project.build.directory}/checkstyle-result.xml"
      */
     private File outputFile;
 
@@ -323,15 +322,15 @@
     private String outputFileFormat;
 
     /**
-     * <p>
-     * Specifies the location of the package names XML to be used to configure 
+     * <p/>
+     * Specifies the location of the package names XML to be used to configure
      * the Checkstyle <a 
href="http://checkstyle.sourceforge.net/config.html#Packages";>Packages</a>.
      * </p>
-     * 
-     * <p>
-     * This parameter is resolved as resource, URL, then file.  
+     * <p/>
+     * <p/>
+     * This parameter is resolved as resource, URL, then file.
      * If resolved to a resource, or a URL, the contents of the package names
-     * XML is copied into the 
+     * XML is copied into the
      * <code>${project.build.directory}/checkstyle-packagenames.xml</code>
      * file before being passed to checkstyle for loading.
      * </p>
@@ -373,12 +372,14 @@
 
     /**
      * Output errors to console.
+     *
      * @parameter default-value="false"
      */
     private boolean consoleOutput;
 
     /**
      * Location of the Xrefs to link to.
+     *
      * @parameter default-value="${project.build.directory}/site/xref"
      */
     private String xrefLocation;
@@ -392,7 +393,7 @@
 
     /**
      * Velocity Component
-     * 
+     *
      * @component role="org.codehaus.plexus.velocity.VelocityComponent"
      * @required
      */
@@ -479,7 +480,8 @@
             Thread.currentThread().setContextClassLoader( 
checkstyleClassLoader );
 
             moduleFactory = getModuleFactory();
-            config = ConfigurationLoader.loadConfiguration( configFile, new 
PropertiesExpander( overridingProperties ) );
+            config =
+                ConfigurationLoader.loadConfiguration( configFile, new 
PropertiesExpander( overridingProperties ) );
             results = executeCheckstyle( config, moduleFactory );
         }
         catch ( CheckstyleException e )
@@ -554,8 +556,8 @@
     {
         String copyright;
         int currentYear = Calendar.getInstance().get( Calendar.YEAR );
-        if ( StringUtils.isNotEmpty( project.getInceptionYear() )
-            && !String.valueOf( currentYear ).equals( 
project.getInceptionYear() ) )
+        if ( StringUtils.isNotEmpty( project.getInceptionYear() ) &&
+            !String.valueOf( currentYear ).equals( project.getInceptionYear() 
) )
         {
             copyright = project.getInceptionYear() + " - " + currentYear;
         }
@@ -589,7 +591,7 @@
 
     /**
      * Merge in the deprecated parameters to the new ones, unless the new 
parameters have values.
-     * 
+     *
      * @deprecated Remove when deprecated params are removed.
      */
     private void mergeDeprecatedInfo()
@@ -758,8 +760,8 @@
             else
             {
                 // TODO: failure if not a report
-                throw new MavenReportException( "Invalid output file format: 
(" + outputFileFormat
-                    + "). Must be 'plain' or 'xml'." );
+                throw new MavenReportException(
+                    "Invalid output file format: (" + outputFileFormat + "). 
Must be 'plain' or 'xml'." );
             }
         }
 

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
 Sun Mar 26 19:17:01 2006
@@ -16,22 +16,21 @@
  * limitations under the License.
  */
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ResourceBundle;
-
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.logging.SystemStreamLog;
-import org.codehaus.doxia.sink.Sink;
-import org.codehaus.plexus.util.StringUtils;
-
 import com.puppycrawl.tools.checkstyle.ModuleFactory;
 import com.puppycrawl.tools.checkstyle.api.AuditEvent;
 import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
 import com.puppycrawl.tools.checkstyle.api.Configuration;
 import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+import org.codehaus.doxia.sink.Sink;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ResourceBundle;
 
 public class CheckstyleReportGenerator
 {
@@ -90,9 +89,13 @@
         String title;
 
         if ( getSeverityLevel() == null )
+        {
             title = bundle.getString( "report.checkstyle.title" );
+        }
         else
+        {
             title = bundle.getString( "report.checkstyle.severity_title" ) + 
severityLevel.getName();
+        }
 
         return title;
     }
@@ -368,7 +371,7 @@
 
     /**
      * Splits a string against a delim consisting of a string (not a single 
character).
-     * 
+     *
      * @param input
      * @param delim
      * @return
@@ -625,19 +628,29 @@
             SeverityLevel level = event.getSeverityLevel();
 
             if ( getSeverityLevel() != null )
+            {
                 if ( !getSeverityLevel().equals( level ) )
+                {
                     continue;
+                }
+            }
 
             sink.tableRow();
 
             sink.tableCell();
 
             if ( SeverityLevel.INFO.equals( level ) )
+            {
                 iconInfo();
+            }
             else if ( SeverityLevel.WARNING.equals( level ) )
+            {
                 iconWarning();
+            }
             else if ( SeverityLevel.ERROR.equals( level ) )
+            {
                 iconError();
+            }
 
             sink.tableCell_();
 
@@ -649,7 +662,8 @@
             if ( getXrefLocation() != null )
             {
                 sink
-                    .link( getXrefLocation() + "/" + filename.replaceAll( 
"\\.java$", ".html" ) + "#" + event.getLine() );
+                    .link(
+                        getXrefLocation() + "/" + filename.replaceAll( 
"\\.java$", ".html" ) + "#" + event.getLine() );
             }
             sink.text( String.valueOf( event.getLine() ) );
             if ( getXrefLocation() != null )
@@ -746,11 +760,11 @@
     /**
      * This is here purely as a hack against the large lines the XhtmlSink
      * produces.
-     * 
+     * <p/>
      * On a large report, this causes the report output to end prematurely.
-     * 
+     * <p/>
      * Doxia needs to be fixed. See MNG-1744 for details.
-     * 
+     *
      * @deprecated Remove when Doxia's XhtmlSink and MNG-1744 are fixed.
      */
     private void doxiaHack()

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
 Sun Mar 26 19:17:01 2006
@@ -16,15 +16,14 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.util.List;
-
-import org.codehaus.plexus.util.StringUtils;
-
 import com.puppycrawl.tools.checkstyle.api.AuditEvent;
 import com.puppycrawl.tools.checkstyle.api.AuditListener;
 import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
 import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.util.List;
 
 /**
  * @author <a href="mailto:[EMAIL PROTECTED]">Emmanuel Venisse</a>
@@ -85,7 +84,10 @@
 
     public void addError( AuditEvent event )
     {
-        if ( SeverityLevel.IGNORE.equals( event.getSeverityLevel() ) ) return;
+        if ( SeverityLevel.IGNORE.equals( event.getSeverityLevel() ) )
+        {
+            return;
+        }
 
         if ( severityLevel == null || severityLevel.equals( 
event.getSeverityLevel() ) )
         {

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java
 Sun Mar 26 19:17:01 2006
@@ -16,18 +16,18 @@
  * limitations under the License.
  */
 
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import com.puppycrawl.tools.checkstyle.api.AuditEvent;
-import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
-
 /**
  * Object holding the references to the CheckstyleResults.
- * 
+ *
  * @author <a href="mailto:[EMAIL PROTECTED]">Joakim Erdfelt</a>
  * @todo provide fallback to disk based storage if too many results.
  */
@@ -76,52 +76,55 @@
     {
         return this.files.size();
     }
-    
+
     public long getSeverityCount( SeverityLevel level )
     {
         long count = 0;
-        
+
         Iterator it = this.files.values().iterator();
-        
+
         while ( it.hasNext() )
         {
             List errors = (List) it.next();
-            
-            count = count + getSeverityCount(errors, level);
+
+            count = count + getSeverityCount( errors, level );
         }
 
         return count;
     }
-    
+
     public long getSeverityCount( String file, SeverityLevel level )
     {
         long count = 0;
-        
+
         if ( !this.files.containsKey( file ) )
         {
             return count;
         }
-        
-        List violations = (List) this.files.get(file);
-        
+
+        List violations = (List) this.files.get( file );
+
         count = getSeverityCount( violations, level );
 
         return count;
     }
-    
+
     public long getSeverityCount( List violations, SeverityLevel level )
     {
         long count = 0;
-        
+
         Iterator it = violations.iterator();
-        
-        while(it.hasNext())
+
+        while ( it.hasNext() )
         {
             AuditEvent event = (AuditEvent) it.next();
-            
-            if ( event.getSeverityLevel().equals( level ) ) count++;
+
+            if ( event.getSeverityLevel().equals( level ) )
+            {
+                count++;
+            }
         }
-        
+
         return count;
     }
 }

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java?rev=389011&r1=389010&r2=389011&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
 Sun Mar 26 19:17:01 2006
@@ -45,7 +45,7 @@
      * determined by the <code>outputFileFormat</code>
      *
      * @parameter expression="${checkstyle.output.file}"
-     *            
default-value="${project.build.directory}/checkstyle-result.xml"
+     * default-value="${project.build.directory}/checkstyle-result.xml"
      */
     private File outputFile;
 
@@ -70,14 +70,14 @@
     {
         if ( !"xml".equals( outputFileFormat ) )
         {
-            throw new MojoExecutionException( "Output format is '" + 
outputFileFormat
-                + "', checkstyle:check requires format to be 'xml'." );
+            throw new MojoExecutionException(
+                "Output format is '" + outputFileFormat + "', checkstyle:check 
requires format to be 'xml'." );
         }
 
         if ( !outputFile.exists() )
         {
-            getLog().info( "Unable to perform checkstyle:check, "
-                + "unable to find checkstyle:checkstyle outputFile." );
+            getLog().info(
+                "Unable to perform checkstyle:check, " + "unable to find 
checkstyle:checkstyle outputFile." );
             return;
         }
 
@@ -91,16 +91,16 @@
             int violations = countViolations( xpp );
             if ( violations > 0 )
             {
-               if ( failOnViolation )
-               {
-                   throw new MojoFailureException( "You have " + violations + 
" checkstyle violation"
-                       + ( ( violations > 1 ) ? "s" : "" ) + "." );
-               }
-               else
-               {
-                           getLog().warn( "checkstyle:check violations 
detected but failOnViolation set to false" );
-                               }
-                       }
+                if ( failOnViolation )
+                {
+                    throw new MojoFailureException(
+                        "You have " + violations + " checkstyle violation" + ( 
( violations > 1 ) ? "s" : "" ) + "." );
+                }
+                else
+                {
+                    getLog().warn( "checkstyle:check violations detected but 
failOnViolation set to false" );
+                }
+            }
         }
         catch ( IOException e )
         {

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java
 Sun Mar 26 19:17:01 2006
@@ -16,18 +16,18 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URL;
-
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugin.logging.SystemStreamLog;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+
 /**
- * Performs Locator services for the <code>*Location</code> parameters in the 
+ * Performs Locator services for the <code>*Location</code> parameters in the
  * Reports.
  *
  * @author <a href="mailto:[EMAIL PROTECTED]">Joakim Erdfelt</a>
@@ -35,12 +35,13 @@
 public class Locator
 {
     private Log log;
+
     private File localDir;
 
     /**
      * Create a Locator object.
-     * 
-     * @param logger the logger object to log with.
+     *
+     * @param logger       the logger object to log with.
      * @param resolveToDir the directory to resolve resources into.
      */
     public Locator( Log log, File resolveToDir )
@@ -51,7 +52,7 @@
 
     /**
      * Obtain a Log object.
-     * 
+     *
      * @return the Log object.
      */
     private Log getLog()
@@ -64,17 +65,17 @@
     }
 
     /**
-     * <p>
+     * <p/>
      * Attempts to resolve a location parameter into a real file.
      * </p>
-     * 
-     * <p>
+     * <p/>
+     * <p/>
      * Checks a location string to for a resource, URL, or File that matches.
      * If a resource or URL is found, then a local file is created with that
      * locations contents.
      * </p>
-     * 
-     * @param location the location string to match against.
+     *
+     * @param location  the location string to match against.
      * @param localfile the local file to use in case of resource or URL.
      * @return the File of the resolved location.
      * @throws IOException if file is unable to be found or copied into 
<code>localfile</code> destination.

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/ReportResource.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/ReportResource.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/ReportResource.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/ReportResource.java
 Sun Mar 26 19:17:01 2006
@@ -16,17 +16,17 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugin.logging.SystemStreamLog;
 import org.codehaus.plexus.util.FileUtils;
 
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
 /**
  * Generic Report Resource management.
- * 
+ *
  * @author <a href="mailto:[EMAIL PROTECTED]">Joakim Erdfelt</a>
  */
 public class ReportResource

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java?rev=389011&r1=389010&r2=389011&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java
 Sun Mar 26 19:17:01 2006
@@ -16,11 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugin.logging.SystemStreamLog;
@@ -29,12 +24,17 @@
 import org.apache.velocity.exception.VelocityException;
 import org.codehaus.plexus.velocity.VelocityComponent;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
 /**
- * <p>
+ * <p/>
  * A component to work with VelocityTemplates from within plugins.
  * </p>
- * 
- * <p>
+ * <p/>
+ * <p/>
  * You will need to reference the velocity component as a parameter
  * in your plugin.  Like this:
  * </p>
@@ -46,7 +46,7 @@
  *  &#042;/
  *  private VelocityComponent velocity;
  * </pre>
- * 
+ *
  * @author <a href="mailto:[EMAIL PROTECTED]">Joakim Erdfelt</a>
  */
 public class VelocityTemplate
@@ -75,12 +75,12 @@
 
     /**
      * Using a specified Velocity Template and provided context, create the 
outputFilename.
-     * @param outputFilename the file to be generated.
-     * @param template the velocity template to use.
-     * @param context the velocity context map.
      *
+     * @param outputFilename the file to be generated.
+     * @param template       the velocity template to use.
+     * @param context        the velocity context map.
      * @throws ResourceNotFoundException if the template was not found.
-     * @throws VelocityException if the 
+     * @throws VelocityException         if the
      * @throws MojoExecutionException
      * @throws IOException
      */


Reply via email to