Fixing Javadoc issues when building with JDK 8:
- Self closing elements like <p/> are disallowed, just a single <p> is needed to create a new paragraph.
- Documenting @param and @return for methods.
- Escaping > with >.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin@1797601 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
index 0462255..950f116 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
@@ -82,26 +82,19 @@
/**
* <p>
* Specifies the location of the XML configuration to use.
- * </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
* module</a>) configuration of rulesets.
- * </p>
- * <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>
* There are 2 predefined rulesets included in Maven Checkstyle Plugin:
- * </p>
* <ul>
* <li><code>sun_checks.xml</code>: Sun Checks.</li>
* <li><code>google_checks.xml</code>: Google Checks.</li>
@@ -137,21 +130,16 @@
* Specifies the location of the License file (a.k.a. the header file) that
* can be used by Checkstyle to verify that source code has the correct
* license header.
- * </p>
* <p>
- * You need to use ${checkstyle.header.file} in your Checkstyle xml
+ * You need to use <code>${checkstyle.header.file}</code> in your Checkstyle xml
* configuration to reference the name of this header file.
- * </p>
* <p>
* For instance:
- * </p>
- * <p>
- * <code>
- * <module name="RegexpHeader">
- * <property name="headerFile" value="${checkstyle.header.file}"/>
- * </module>
- * </code>
- * </p>
+ * <pre>
+ * <module name="RegexpHeader">
+ * <property name="headerFile" value="${checkstyle.header.file}"/>
+ * </module>
+ * </pre>
*
* @since 2.0-beta-2
*/
@@ -177,21 +165,16 @@
/**
* <p>
* Specifies the location of the properties file.
- * </p>
- * <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/>
* <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>
*
* @since 2.0-beta-2
*/
@@ -320,19 +303,14 @@
/**
* <p>
* Specifies the location of the suppressions XML file to use.
- * </p>
- * <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>
- * <p/>
* <p>
* See <code>suppressionsFileExpression</code> for the property that will
* be made available to your Checkstyle configuration.
- * </p>
*
* @since 2.0-beta-2
*/
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
index 529c2bb..972cd0d 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
@@ -838,7 +838,7 @@
private final long violations;
private final int count;
- public ConfReference( String category, Configuration configuration,
+ ConfReference( String category, Configuration configuration,
ChainedItem<Configuration> parentConfiguration, long violations, int count )
{
this.category = category;
@@ -865,7 +865,7 @@
private final T value;
- public ChainedItem( T value, ChainedItem<T> parent )
+ ChainedItem( T value, ChainedItem<T> parent )
{
this.parent = parent;
this.value = value;
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
index 1367762..1bc6c59 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
@@ -179,26 +179,19 @@
/**
* <p>
* Specifies the location of the XML configuration to use.
- * </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
* module</a>) configuration of rulesets.
- * </p>
- * <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>
* There are 2 predefined rulesets.
- * </p>
* <ul>
* <li><code>sun_checks.xml</code>: Sun Checks.</li>
* <li><code>google_checks.xml</code>: Google Checks.</li>
@@ -212,21 +205,16 @@
/**
* <p>
* Specifies the location of the properties file.
- * </p>
- * <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/>
* <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>
*
* @since 2.5
*/
@@ -244,21 +232,16 @@
* Specifies the location of the License file (a.k.a. the header file) that
* can be used by Checkstyle to verify that source code has the correct
* license header.
- * </p>
* <p>
- * You need to use ${checkstyle.header.file} in your Checkstyle xml
+ * You need to use <code>${checkstyle.header.file}</code> in your Checkstyle xml
* configuration to reference the name of this header file.
- * </p>
* <p>
* For instance:
- * </p>
- * <p>
- * <code>
- * <module name="RegexpHeader">
- * <property name="headerFile" value="${checkstyle.header.file}"/>
- * </module>
- * </code>
- * </p>
+ * <pre>
+ * <module name="RegexpHeader">
+ * <property name="headerFile" value="${checkstyle.header.file}"/>
+ * </module>
+ * </pre>
*
* @since 2.0-beta-2
*/
@@ -282,19 +265,14 @@
/**
* <p>
* Specifies the location of the suppressions XML file to use.
- * </p>
- * <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-suppressions.xml</code> file
* before being passed to Checkstyle for loading.
- * </p>
- * <p/>
* <p>
* See <code>suppressionsFileExpression</code> for the property that will
* be made available to your Checkstyle configuration.
- * </p>
*
* @since 2.0-beta-2
*/
@@ -468,7 +446,7 @@
private PlexusConfiguration checkstyleRules;
/**
- * dump file for inlined Checkstyle rules
+ * Dump file for inlined Checkstyle rules.
*/
@Parameter( property = "checkstyle.output.rules.file",
defaultValue = "${project.build.directory}/checkstyle-rules.xml" )
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/RuleUtil.java b/src/main/java/org/apache/maven/plugins/checkstyle/RuleUtil.java
index c0b98f0..79e943e 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/RuleUtil.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/RuleUtil.java
@@ -161,7 +161,7 @@
{
private final String rule;
- public RuleMatcher( String rule )
+ RuleMatcher( String rule )
{
this.rule = rule;
}
@@ -177,7 +177,7 @@
{
private final String packageName;
- public PackageMatcher( String packageName )
+ PackageMatcher( String packageName )
{
this.packageName = packageName;
}
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleCheckerListener.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleCheckerListener.java
index 5eb1235..a1fcc7f 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleCheckerListener.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleCheckerListener.java
@@ -93,7 +93,7 @@
}
/**
- * @param severityLevel
+ * @param severityLevel The severity level of the events to listen to.
*/
public void setSeverityLevelFilter( SeverityLevel severityLevel )
{
@@ -101,7 +101,7 @@
}
/**
- * @return
+ * @return The severity level of the events to listen to.
*/
public SeverityLevel getSeverityLevelFilter()
{
@@ -173,7 +173,7 @@
}
/**
- * @return
+ * @return The results of Checkstyle invocation.
*/
public CheckstyleResults getResults()
{
@@ -182,7 +182,7 @@
}
/**
- * @param results
+ * @param results The results of Checkstyle invocation.
*/
public void setResults( CheckstyleResults results )
{
@@ -191,6 +191,7 @@
/**
* @since 2.5
+ * @return The configuration of Checkstyle to use.
*/
public Configuration getCheckstyleConfiguration()
{
@@ -198,6 +199,7 @@
}
/**
+ * @param checkstyleConfiguration The configuration of Checkstyle to use.
* @since 2.5
*/
public void setCheckstyleConfiguration( Configuration checkstyleConfiguration )
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutor.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutor.java
index 93d8592..3661ee3 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutor.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutor.java
@@ -33,8 +33,8 @@
/**
* @param request {@link CheckstyleExecutorRequest}
* @return {@link CheckstyleResults}
- * @throws CheckstyleExecutorException
- * @throws CheckstyleException
+ * @throws CheckstyleExecutorException in case of an error during plugin execution.
+ * @throws CheckstyleException in case of an error raised by Checkstyle.
*/
CheckstyleResults executeCheckstyle( CheckstyleExecutorRequest request )
throws CheckstyleExecutorException, CheckstyleException;
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorException.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorException.java
index 9da2fe3..648843a 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorException.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorException.java
@@ -39,7 +39,7 @@
}
/**
- * @param message
+ * @param message Message of the exception.
*/
public CheckstyleExecutorException( String message )
{
@@ -47,7 +47,7 @@
}
/**
- * @param cause
+ * @param cause Cause of the exception.
*/
public CheckstyleExecutorException( Throwable cause )
{
@@ -55,8 +55,8 @@
}
/**
- * @param message
- * @param cause
+ * @param message Message of the exception.
+ * @param cause Cause of the exception.
*/
public CheckstyleExecutorException( String message, Throwable cause )
{
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorRequest.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorRequest.java
index dcb4dcb..36e2cfd 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorRequest.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorRequest.java
@@ -451,7 +451,7 @@
/**
* Sets a list of license artifacts, which may contain the license.
*
- * @param licenseArtifacts
+ * @param licenseArtifacts List of license artifacts.
* @return This object.
*/
public CheckstyleExecutorRequest setLicenseArtifacts( List<Artifact> licenseArtifacts )
@@ -473,7 +473,7 @@
/**
* Sets a list of artifacts, which may contain the checkstyle configuration.
*
- * @param configArtifacts
+ * @param configArtifacts List of artifacts.
* @return This object.
*/
public CheckstyleExecutorRequest setConfigurationArtifacts( List<Artifact> configArtifacts )
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResults.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResults.java
index fefa5f7..ce2a4a6 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResults.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResults.java
@@ -30,10 +30,10 @@
/**
* Object holding the references to the CheckstyleResults.
+ * TODO: provide fallback to disk based storage if too many results.
*
* @author <a href="mailto:joakim@erdfelt.net">Joakim Erdfelt</a>
* @version $Id$
- * @todo provide fallback to disk based storage if too many results.
*/
public class CheckstyleResults
{
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/rss/DefaultCheckstyleRssGenerator.java b/src/main/java/org/apache/maven/plugins/checkstyle/rss/DefaultCheckstyleRssGenerator.java
index 6808bff..03c1280 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/rss/DefaultCheckstyleRssGenerator.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/rss/DefaultCheckstyleRssGenerator.java
@@ -47,9 +47,7 @@
@Requirement
private VelocityComponent velocityComponent;
- /**
- * @see org.apache.maven.plugins.checkstyle.rss.CheckstyleRssGenerator#generateRSS(org.apache.maven.plugins.checkstyle.exec.CheckstyleResults)
- */
+ @Override
public void generateRSS( CheckstyleResults results, CheckstyleRssGeneratorRequest checkstyleRssGeneratorRequest )
throws MavenReportException
{
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/rss/VelocityTemplate.java b/src/main/java/org/apache/maven/plugins/checkstyle/rss/VelocityTemplate.java
index 20b8cae..bb335a1 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/rss/VelocityTemplate.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/rss/VelocityTemplate.java
@@ -35,12 +35,9 @@
/**
* <p>
* A component to work with VelocityTemplates from within plugins.
- * </p>
- *
- * <p/>
+ * <p>
* You will need to reference the velocity component as a parameter
* in your plugin. Like this:
- * </p>
* <pre>
* /**
* * Velocity Component
@@ -83,8 +80,8 @@
* @param template the velocity template to use.
* @param context the velocity context map.
* @throws VelocityException if the template was not found or any other Velocity exception.
- * @throws MojoExecutionException
- * @throws IOException
+ * @throws MojoExecutionException if merging the velocity template failed.
+ * @throws IOException if there was an error when writing to the output file.
*/
public void generate( String outputFilename, String template, Context context )
throws VelocityException, MojoExecutionException, IOException