You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2014/03/08 22:54:26 UTC
svn commit: r1575615 - in
/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle:
./ resource/
Author: dennisl
Date: Sat Mar 8 21:54:26 2014
New Revision: 1575615
URL: http://svn.apache.org/r1575615
Log:
Fix 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/CheckstyleAggregateReport.java
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/CheckstyleViolationCheckMojo.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/resource/LicenseResourceManager.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=1575615&r1=1575614&r2=1575615&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 Sat Mar 8 21:54:26 2014
@@ -385,7 +385,8 @@ public abstract class AbstractCheckstyle
private File xrefLocation;
/**
- * When using custom treeWalkers, specify their names here so the checks inside the treeWalker end up the the rule-summary
+ * When using custom treeWalkers, specify their names here so the checks
+ * inside the treeWalker end up the the rule-summary.
*
* @since 2.11
*/
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleAggregateReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleAggregateReport.java?rev=1575615&r1=1575614&r2=1575615&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleAggregateReport.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleAggregateReport.java Sat Mar 8 21:54:26 2014
@@ -25,11 +25,12 @@ import org.apache.maven.plugins.annotati
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReportException;
-import java.io.File;
import java.util.List;
/**
- * A reporting task that performs Checkstyle analysis and generates an aggregate HTML report on the violations that checkstyle finds in a multi-module reactor build.
+ * A reporting task that performs Checkstyle analysis and generates an aggregate
+ * HTML report on the violations that Checkstyle finds in a multi-module reactor
+ * build.
*
* @version $Id$
* @since 2.8
@@ -71,7 +72,7 @@ public class CheckstyleAggregateReport
.setIncludeTestSourceDirectory( includeTestSourceDirectory ).setListener( getListener() )
.setLog( getLog() ).setProject( project ).setSourceDirectory( sourceDirectory ).setResources( resources )
.setTestResources( testResources )
- .setStringOutputStream(stringOutputStream).setSuppressionsLocation( suppressionsLocation )
+ .setStringOutputStream( stringOutputStream ).setSuppressionsLocation( suppressionsLocation )
.setTestSourceDirectory( testSourceDirectory ).setConfigLocation( configLocation )
.setPropertyExpansion( propertyExpansion ).setHeaderLocation( headerLocation )
.setCacheFile( cacheFile ).setSuppressionsFileExpression( suppressionsFileExpression )
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java?rev=1575615&r1=1575614&r2=1575615&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 Sat Mar 8 21:54:26 2014
@@ -36,7 +36,8 @@ import java.util.Locale;
import java.util.Map;
/**
- * A reporting task that performs Checkstyle analysis and generates an HTML report on any violations that Checkstyle finds.
+ * A reporting task that performs Checkstyle analysis and generates an HTML
+ * report on any violations that Checkstyle finds.
*
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
@@ -202,7 +203,7 @@ public class CheckstyleReport
*/
private boolean hasResources( List<Resource> resources )
{
- for( Resource resource : resources )
+ for ( Resource resource : resources )
{
if ( new File( resource.getDirectory() ).exists() )
{
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=1575615&r1=1575614&r2=1575615&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 Sat Mar 8 21:54:26 2014
@@ -52,7 +52,8 @@ import java.io.Reader;
import java.util.List;
/**
- * Performs Checkstyle analysis and outputs violations or a count of violations to the console, potentially failing the build.
+ * Performs Checkstyle analysis and outputs violations or a count of violations
+ * to the console, potentially failing the build.
* It can also be configured to re-use an earlier analysis.
*
* @author <a href="mailto:joakim@erdfelt.net">Joakim Erdfelt</a>
@@ -66,9 +67,9 @@ public class CheckstyleViolationCheckMoj
private static final String JAVA_FILES = "**\\/*.java";
- private static final String CHECKSTYLE_FILE_HEADER = "<?xml version=\"1.0\"?>\n" +
- "<!DOCTYPE module PUBLIC \"-//Puppy Crawl//DTD Check Configuration 1.2//EN\"\n" +
- " \"http://www.puppycrawl.com/dtds/configuration_1_2.dtd\">\n";
+ private static final String CHECKSTYLE_FILE_HEADER = "<?xml version=\"1.0\"?>\n"
+ + "<!DOCTYPE module PUBLIC \"-//Puppy Crawl//DTD Check Configuration 1.2//EN\"\n"
+ + " \"http://www.puppycrawl.com/dtds/configuration_1_2.dtd\">\n";
/**
* Specifies the path and filename to save the Checkstyle output. The format
@@ -463,7 +464,8 @@ public class CheckstyleViolationCheckMoj
.setIncludeResources( includeResources )
.setIncludeTestResources( includeTestResources )
.setIncludeTestSourceDirectory( includeTestSourceDirectory ).setListener( getListener() )
- .setLog( getLog() ).setProject( project ).setSourceDirectory( sourceDirectory ).setResources( resources )
+ .setLog( getLog() ).setProject( project ).setSourceDirectory( sourceDirectory )
+ .setResources( resources )
.setStringOutputStream( stringOutputStream ).setSuppressionsLocation( suppressionsLocation )
.setTestSourceDirectory( testSourceDirectory ).setConfigLocation( configLocation )
.setPropertyExpansion( propertyExpansion ).setHeaderLocation( headerLocation )
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java?rev=1575615&r1=1575614&r2=1575615&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java Sat Mar 8 21:54:26 2014
@@ -92,7 +92,7 @@ public class DefaultCheckstyleExecutor
MavenProject project = request.getProject();
- configureResourceLocator( locator, request);
+ configureResourceLocator( locator, request );
configureResourceLocator( licenseLocator, request );
@@ -639,7 +639,7 @@ public class DefaultCheckstyleExecutor
private String getSuppressionsFilePath( final CheckstyleExecutorRequest request ) throws CheckstyleExecutorException
{
final String suppressionsLocation = request.getSuppressionsLocation();
- if (StringUtils.isEmpty( suppressionsLocation ) )
+ if ( StringUtils.isEmpty( suppressionsLocation ) )
{
return null;
}
@@ -698,7 +698,8 @@ public class DefaultCheckstyleExecutor
*
* @param request executor request data.
*/
- private void configureResourceLocator( final ResourceManager resourceManager, final CheckstyleExecutorRequest request )
+ private void configureResourceLocator( final ResourceManager resourceManager,
+ final CheckstyleExecutorRequest request )
{
final MavenProject project = request.getProject();
resourceManager.setOutputDirectory( new File( project.getBuild().getDirectory() ) );
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/resource/LicenseResourceManager.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/resource/LicenseResourceManager.java?rev=1575615&r1=1575614&r2=1575615&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/resource/LicenseResourceManager.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/resource/LicenseResourceManager.java Sat Mar 8 21:54:26 2014
@@ -57,9 +57,11 @@ public class LicenseResourceManager
{
for ( ResourceLoader resourceLoader : resourceLoaders.values() )
{
- if ( resourceLoader instanceof ThreadContextClasspathResourceLoader && !"config/maven-header.txt".equals( name ) )
+ if ( resourceLoader instanceof ThreadContextClasspathResourceLoader
+ && !"config/maven-header.txt".equals( name ) )
{
- // MCHECKSTYLE-219: Don't load the license from the plugin classloader, only allow config/maven-header.txt
+ // MCHECKSTYLE-219: Don't load the license from the plugin
+ // classloader, only allow config/maven-header.txt
continue;
}