o Fix Checkstyle errors.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@560431 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java b/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
index a126553..a080774 100644
--- a/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
+++ b/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
@@ -63,6 +63,8 @@
public abstract class AbstractCheckDocumentationMojo
extends AbstractMojo
{
+ private static final int HTTP_STATUS_200 = 200;
+
/**
* @parameter default-value="${reactorProjects}"
* @readonly
@@ -439,7 +441,8 @@
String url = license.getUrl();
if ( StringUtils.isEmpty( url ) )
{
- reporter.error( "pom.xml is missing the <licenses>/<license>/<url> tag for the license \'" + license.getName() + "\'." );
+ reporter.error( "pom.xml is missing the <licenses>/<license>/<url> tag for the license \'"
+ + license.getName() + "\'." );
}
else
{
@@ -487,7 +490,7 @@
try
{
getLog().debug( "Verifying http url: " + url );
- if ( httpClient.executeMethod( headMethod ) != 200 )
+ if ( httpClient.executeMethod( headMethod ) != HTTP_STATUS_200 )
{
reporter.error( "Cannot reach " + description + " with URL: \'" + url + "\'." );
}
diff --git a/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java b/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
index 018fa85..5ee7452 100644
--- a/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
+++ b/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
@@ -108,10 +108,11 @@
{
String paramDescription = param.getDescription();
- if ( paramDescription == null || paramDescription.trim().length() < MIN_DESCRIPTION_LENGTH )
+ if ( paramDescription == null
+ || paramDescription.trim().length() < MIN_DESCRIPTION_LENGTH )
{
- reporter.error( "Parameter: \'" + param.getName() + "\' in mojo: \'" + mojo.getGoal() +
- "\' is missing a description." );
+ reporter.error( "Parameter: \'" + param.getName() + "\' in mojo: \'"
+ + mojo.getGoal() + "\' is missing a description." );
}
}
}
@@ -169,8 +170,8 @@
}
catch ( IOException e )
{
- reporter.error( "Unable to read site.xml file: \'" + siteXml.getAbsolutePath() +
- "\'.\nError: " + e.getMessage() );
+ reporter.error( "Unable to read site.xml file: \'" + siteXml.getAbsolutePath()
+ + "\'.\nError: " + e.getMessage() );
}
}
@@ -187,8 +188,8 @@
}
// check for **/examples/**.(apt|html|xml) or **/example*.(apt|html|xml)
- if ( !findFiles( projectSiteDirectory, "**/examples/*" ) &&
- !findFiles( projectSiteDirectory, "**/example*" ) )
+ if ( !findFiles( projectSiteDirectory, "**/examples/*" )
+ && !findFiles( projectSiteDirectory, "**/example*" ) )
{
reporter.error( "There are no example files in your site directory (in apt|html|xml format)."
+ " They should either be called \'example*.(apt|html|xml)\'"
diff --git a/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java b/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java
index 261deab..a29d22c 100644
--- a/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java
+++ b/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java
@@ -24,9 +24,9 @@
*/
public interface DocumentationReport
{
- static final int TYPE_INFO = 1;
- static final int TYPE_WARN = 2;
- static final int TYPE_ERROR = 3;
+ int TYPE_INFO = 1;
+ int TYPE_WARN = 2;
+ int TYPE_ERROR = 3;
String getMessage();
diff --git a/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java b/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java
index c370855..88afd5c 100644
--- a/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java
+++ b/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java
@@ -49,7 +49,7 @@
{
List list = new ArrayList();
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();
@@ -66,7 +66,7 @@
{
List list = new ArrayList();
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();
@@ -78,7 +78,7 @@
public boolean hasErrors()
{
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();