Skip to content

Commit

Permalink
Fixing Javadoc issues when building with JDK 8:
Browse files Browse the repository at this point in the history
 - 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 &gt;.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1797601 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Guillaume Boué committed Jun 4, 2017
1 parent 5f9eb5f commit 898a9db
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,19 @@ public abstract class AbstractCheckstyleReport
/**
* <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>
Expand Down Expand Up @@ -137,21 +130,16 @@ public abstract class AbstractCheckstyleReport
* 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>
* &lt;module name="RegexpHeader">
* &lt;property name="headerFile" value="${checkstyle.header.file}"/>
* &lt;/module>
* </code>
* </p>
* <pre>
* &lt;module name="RegexpHeader"&gt;
* &lt;property name="headerFile" value="${checkstyle.header.file}"/&gt;
* &lt;/module&gt;
* </pre>
*
* @since 2.0-beta-2
*/
Expand All @@ -177,21 +165,16 @@ public abstract class AbstractCheckstyleReport
/**
* <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
*/
Expand Down Expand Up @@ -320,19 +303,14 @@ public abstract class AbstractCheckstyleReport
/**
* <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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ private static class ConfReference
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;
Expand All @@ -865,7 +865,7 @@ private static class ChainedItem<T>

private final T value;

public ChainedItem( T value, ChainedItem<T> parent )
ChainedItem( T value, ChainedItem<T> parent )
{
this.parent = parent;
this.value = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,19 @@ public class CheckstyleViolationCheckMojo
/**
* <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>
Expand All @@ -212,21 +205,16 @@ public class CheckstyleViolationCheckMojo
/**
* <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
*/
Expand All @@ -244,21 +232,16 @@ public class CheckstyleViolationCheckMojo
* 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>
* &lt;module name="RegexpHeader">
* &lt;property name="headerFile" value="${checkstyle.header.file}"/>
* &lt;/module>
* </code>
* </p>
* <pre>
* &lt;module name="RegexpHeader"&gt;
* &lt;property name="headerFile" value="${checkstyle.header.file}"/&gt;
* &lt;/module&gt;
* </pre>
*
* @since 2.0-beta-2
*/
Expand All @@ -282,19 +265,14 @@ public class CheckstyleViolationCheckMojo
/**
* <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
*/
Expand Down Expand Up @@ -468,7 +446,7 @@ public class CheckstyleViolationCheckMojo
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" )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private static class RuleMatcher
{
private final String rule;

public RuleMatcher( String rule )
RuleMatcher( String rule )
{
this.rule = rule;
}
Expand All @@ -177,7 +177,7 @@ private static class PackageMatcher
{
private final String packageName;

public PackageMatcher( String packageName )
PackageMatcher( String packageName )
{
this.packageName = packageName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public void addSourceDirectory( File sourceDirectory )
}

/**
* @param severityLevel
* @param severityLevel The severity level of the events to listen to.
*/
public void setSeverityLevelFilter( SeverityLevel severityLevel )
{
this.severityLevel = severityLevel;
}

/**
* @return
* @return The severity level of the events to listen to.
*/
public SeverityLevel getSeverityLevelFilter()
{
Expand Down Expand Up @@ -173,7 +173,7 @@ public void addException( AuditEvent event, Throwable throwable )
}

/**
* @return
* @return The results of Checkstyle invocation.
*/
public CheckstyleResults getResults()
{
Expand All @@ -182,7 +182,7 @@ public CheckstyleResults getResults()
}

/**
* @param results
* @param results The results of Checkstyle invocation.
*/
public void setResults( CheckstyleResults results )
{
Expand All @@ -191,13 +191,15 @@ public void setResults( CheckstyleResults results )

/**
* @since 2.5
* @return The configuration of Checkstyle to use.
*/
public Configuration getCheckstyleConfiguration()
{
return checkstyleConfiguration;
}

/**
* @param checkstyleConfiguration The configuration of Checkstyle to use.
* @since 2.5
*/
public void setCheckstyleConfiguration( Configuration checkstyleConfiguration )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public interface CheckstyleExecutor
/**
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ public CheckstyleExecutorException()
}

/**
* @param message
* @param message Message of the exception.
*/
public CheckstyleExecutorException( String message )
{
super( message );
}

/**
* @param cause
* @param cause Cause of the exception.
*/
public CheckstyleExecutorException( Throwable cause )
{
super( cause );
}

/**
* @param message
* @param cause
* @param message Message of the exception.
* @param cause Cause of the exception.
*/
public CheckstyleExecutorException( String message, Throwable cause )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public List<Artifact> getLicenseArtifacts()
/**
* 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 )
Expand All @@ -473,7 +473,7 @@ public List<Artifact> getConfigurationArtifacts()
/**
* 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 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public class DefaultCheckstyleRssGenerator
@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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
* /&#042;&#042;
* &#042; Velocity Component
Expand Down Expand Up @@ -83,8 +80,8 @@ public VelocityComponent getVelocity()
* @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
Expand Down

0 comments on commit 898a9db

Please sign in to comment.