Skip to content

Commit 898a9db

Browse files
author
Guillaume Boué
committed
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 &gt;. git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1797601 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5f9eb5f commit 898a9db

11 files changed

+36
-83
lines changed

src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,19 @@ public abstract class AbstractCheckstyleReport
8282
/**
8383
* <p>
8484
* Specifies the location of the XML configuration to use.
85-
* </p>
86-
* <p/>
8785
* <p>
8886
* Potential values are a filesystem path, a URL, or a classpath resource.
8987
* This parameter expects that the contents of the location conform to the
9088
* xml format (Checkstyle <a
9189
* href="http://checkstyle.sourceforge.net/config.html#Modules">Checker
9290
* module</a>) configuration of rulesets.
93-
* </p>
94-
* <p/>
9591
* <p>
9692
* This parameter is resolved as resource, URL, then file. If successfully
9793
* resolved, the contents of the configuration is copied into the
9894
* <code>${project.build.directory}/checkstyle-configuration.xml</code>
9995
* file before being passed to Checkstyle as a configuration.
100-
* </p>
101-
* <p/>
10296
* <p>
10397
* There are 2 predefined rulesets included in Maven Checkstyle Plugin:
104-
* </p>
10598
* <ul>
10699
* <li><code>sun_checks.xml</code>: Sun Checks.</li>
107100
* <li><code>google_checks.xml</code>: Google Checks.</li>
@@ -137,21 +130,16 @@ public abstract class AbstractCheckstyleReport
137130
* Specifies the location of the License file (a.k.a. the header file) that
138131
* can be used by Checkstyle to verify that source code has the correct
139132
* license header.
140-
* </p>
141133
* <p>
142-
* You need to use ${checkstyle.header.file} in your Checkstyle xml
134+
* You need to use <code>${checkstyle.header.file}</code> in your Checkstyle xml
143135
* configuration to reference the name of this header file.
144-
* </p>
145136
* <p>
146137
* For instance:
147-
* </p>
148-
* <p>
149-
* <code>
150-
* &lt;module name="RegexpHeader">
151-
* &lt;property name="headerFile" value="${checkstyle.header.file}"/>
152-
* &lt;/module>
153-
* </code>
154-
* </p>
138+
* <pre>
139+
* &lt;module name="RegexpHeader"&gt;
140+
* &lt;property name="headerFile" value="${checkstyle.header.file}"/&gt;
141+
* &lt;/module&gt;
142+
* </pre>
155143
*
156144
* @since 2.0-beta-2
157145
*/
@@ -177,21 +165,16 @@ public abstract class AbstractCheckstyleReport
177165
/**
178166
* <p>
179167
* Specifies the location of the properties file.
180-
* </p>
181-
* <p/>
182168
* <p>
183169
* This parameter is resolved as URL, File then resource. If successfully
184170
* resolved, the contents of the properties location is copied into the
185171
* <code>${project.build.directory}/checkstyle-checker.properties</code>
186172
* file before being passed to Checkstyle for loading.
187-
* </p>
188-
* <p/>
189173
* <p>
190174
* The contents of the <code>propertiesLocation</code> will be made
191175
* available to Checkstyle for specifying values for parameters within the
192176
* xml configuration (specified in the <code>configLocation</code>
193177
* parameter).
194-
* </p>
195178
*
196179
* @since 2.0-beta-2
197180
*/
@@ -320,19 +303,14 @@ public abstract class AbstractCheckstyleReport
320303
/**
321304
* <p>
322305
* Specifies the location of the suppressions XML file to use.
323-
* </p>
324-
* <p/>
325306
* <p>
326307
* This parameter is resolved as resource, URL, then file. If successfully
327308
* resolved, the contents of the suppressions XML is copied into the
328309
* <code>${project.build.directory}/checkstyle-supressions.xml</code> file
329310
* before being passed to Checkstyle for loading.
330-
* </p>
331-
* <p/>
332311
* <p>
333312
* See <code>suppressionsFileExpression</code> for the property that will
334313
* be made available to your Checkstyle configuration.
335-
* </p>
336314
*
337315
* @since 2.0-beta-2
338316
*/

src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ private static class ConfReference
838838
private final long violations;
839839
private final int count;
840840

841-
public ConfReference( String category, Configuration configuration,
841+
ConfReference( String category, Configuration configuration,
842842
ChainedItem<Configuration> parentConfiguration, long violations, int count )
843843
{
844844
this.category = category;
@@ -865,7 +865,7 @@ private static class ChainedItem<T>
865865

866866
private final T value;
867867

868-
public ChainedItem( T value, ChainedItem<T> parent )
868+
ChainedItem( T value, ChainedItem<T> parent )
869869
{
870870
this.parent = parent;
871871
this.value = value;

src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -179,26 +179,19 @@ public class CheckstyleViolationCheckMojo
179179
/**
180180
* <p>
181181
* Specifies the location of the XML configuration to use.
182-
* </p>
183-
* <p/>
184182
* <p>
185183
* Potential values are a filesystem path, a URL, or a classpath resource.
186184
* This parameter expects that the contents of the location conform to the
187185
* xml format (Checkstyle <a
188186
* href="http://checkstyle.sourceforge.net/config.html#Modules">Checker
189187
* module</a>) configuration of rulesets.
190-
* </p>
191-
* <p/>
192188
* <p>
193189
* This parameter is resolved as resource, URL, then file. If successfully
194190
* resolved, the contents of the configuration is copied into the
195191
* <code>${project.build.directory}/checkstyle-configuration.xml</code>
196192
* file before being passed to Checkstyle as a configuration.
197-
* </p>
198-
* <p/>
199193
* <p>
200194
* There are 2 predefined rulesets.
201-
* </p>
202195
* <ul>
203196
* <li><code>sun_checks.xml</code>: Sun Checks.</li>
204197
* <li><code>google_checks.xml</code>: Google Checks.</li>
@@ -212,21 +205,16 @@ public class CheckstyleViolationCheckMojo
212205
/**
213206
* <p>
214207
* Specifies the location of the properties file.
215-
* </p>
216-
* <p/>
217208
* <p>
218209
* This parameter is resolved as URL, File then resource. If successfully
219210
* resolved, the contents of the properties location is copied into the
220211
* <code>${project.build.directory}/checkstyle-checker.properties</code>
221212
* file before being passed to Checkstyle for loading.
222-
* </p>
223-
* <p/>
224213
* <p>
225214
* The contents of the <code>propertiesLocation</code> will be made
226215
* available to Checkstyle for specifying values for parameters within the
227216
* xml configuration (specified in the <code>configLocation</code>
228217
* parameter).
229-
* </p>
230218
*
231219
* @since 2.5
232220
*/
@@ -244,21 +232,16 @@ public class CheckstyleViolationCheckMojo
244232
* Specifies the location of the License file (a.k.a. the header file) that
245233
* can be used by Checkstyle to verify that source code has the correct
246234
* license header.
247-
* </p>
248235
* <p>
249-
* You need to use ${checkstyle.header.file} in your Checkstyle xml
236+
* You need to use <code>${checkstyle.header.file}</code> in your Checkstyle xml
250237
* configuration to reference the name of this header file.
251-
* </p>
252238
* <p>
253239
* For instance:
254-
* </p>
255-
* <p>
256-
* <code>
257-
* &lt;module name="RegexpHeader">
258-
* &lt;property name="headerFile" value="${checkstyle.header.file}"/>
259-
* &lt;/module>
260-
* </code>
261-
* </p>
240+
* <pre>
241+
* &lt;module name="RegexpHeader"&gt;
242+
* &lt;property name="headerFile" value="${checkstyle.header.file}"/&gt;
243+
* &lt;/module&gt;
244+
* </pre>
262245
*
263246
* @since 2.0-beta-2
264247
*/
@@ -282,19 +265,14 @@ public class CheckstyleViolationCheckMojo
282265
/**
283266
* <p>
284267
* Specifies the location of the suppressions XML file to use.
285-
* </p>
286-
* <p/>
287268
* <p>
288269
* This parameter is resolved as resource, URL, then file. If successfully
289270
* resolved, the contents of the suppressions XML is copied into the
290271
* <code>${project.build.directory}/checkstyle-suppressions.xml</code> file
291272
* before being passed to Checkstyle for loading.
292-
* </p>
293-
* <p/>
294273
* <p>
295274
* See <code>suppressionsFileExpression</code> for the property that will
296275
* be made available to your Checkstyle configuration.
297-
* </p>
298276
*
299277
* @since 2.0-beta-2
300278
*/
@@ -468,7 +446,7 @@ public class CheckstyleViolationCheckMojo
468446
private PlexusConfiguration checkstyleRules;
469447

470448
/**
471-
* dump file for inlined Checkstyle rules
449+
* Dump file for inlined Checkstyle rules.
472450
*/
473451
@Parameter( property = "checkstyle.output.rules.file",
474452
defaultValue = "${project.build.directory}/checkstyle-rules.xml" )

src/main/java/org/apache/maven/plugins/checkstyle/RuleUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private static class RuleMatcher
161161
{
162162
private final String rule;
163163

164-
public RuleMatcher( String rule )
164+
RuleMatcher( String rule )
165165
{
166166
this.rule = rule;
167167
}
@@ -177,7 +177,7 @@ private static class PackageMatcher
177177
{
178178
private final String packageName;
179179

180-
public PackageMatcher( String packageName )
180+
PackageMatcher( String packageName )
181181
{
182182
this.packageName = packageName;
183183
}

src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleCheckerListener.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ public void addSourceDirectory( File sourceDirectory )
9393
}
9494

9595
/**
96-
* @param severityLevel
96+
* @param severityLevel The severity level of the events to listen to.
9797
*/
9898
public void setSeverityLevelFilter( SeverityLevel severityLevel )
9999
{
100100
this.severityLevel = severityLevel;
101101
}
102102

103103
/**
104-
* @return
104+
* @return The severity level of the events to listen to.
105105
*/
106106
public SeverityLevel getSeverityLevelFilter()
107107
{
@@ -173,7 +173,7 @@ public void addException( AuditEvent event, Throwable throwable )
173173
}
174174

175175
/**
176-
* @return
176+
* @return The results of Checkstyle invocation.
177177
*/
178178
public CheckstyleResults getResults()
179179
{
@@ -182,7 +182,7 @@ public CheckstyleResults getResults()
182182
}
183183

184184
/**
185-
* @param results
185+
* @param results The results of Checkstyle invocation.
186186
*/
187187
public void setResults( CheckstyleResults results )
188188
{
@@ -191,13 +191,15 @@ public void setResults( CheckstyleResults results )
191191

192192
/**
193193
* @since 2.5
194+
* @return The configuration of Checkstyle to use.
194195
*/
195196
public Configuration getCheckstyleConfiguration()
196197
{
197198
return checkstyleConfiguration;
198199
}
199200

200201
/**
202+
* @param checkstyleConfiguration The configuration of Checkstyle to use.
201203
* @since 2.5
202204
*/
203205
public void setCheckstyleConfiguration( Configuration checkstyleConfiguration )

src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public interface CheckstyleExecutor
3333
/**
3434
* @param request {@link CheckstyleExecutorRequest}
3535
* @return {@link CheckstyleResults}
36-
* @throws CheckstyleExecutorException
37-
* @throws CheckstyleException
36+
* @throws CheckstyleExecutorException in case of an error during plugin execution.
37+
* @throws CheckstyleException in case of an error raised by Checkstyle.
3838
*/
3939
CheckstyleResults executeCheckstyle( CheckstyleExecutorRequest request )
4040
throws CheckstyleExecutorException, CheckstyleException;

src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ public CheckstyleExecutorException()
3939
}
4040

4141
/**
42-
* @param message
42+
* @param message Message of the exception.
4343
*/
4444
public CheckstyleExecutorException( String message )
4545
{
4646
super( message );
4747
}
4848

4949
/**
50-
* @param cause
50+
* @param cause Cause of the exception.
5151
*/
5252
public CheckstyleExecutorException( Throwable cause )
5353
{
5454
super( cause );
5555
}
5656

5757
/**
58-
* @param message
59-
* @param cause
58+
* @param message Message of the exception.
59+
* @param cause Cause of the exception.
6060
*/
6161
public CheckstyleExecutorException( String message, Throwable cause )
6262
{

src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleExecutorRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ public List<Artifact> getLicenseArtifacts()
451451
/**
452452
* Sets a list of license artifacts, which may contain the license.
453453
*
454-
* @param licenseArtifacts
454+
* @param licenseArtifacts List of license artifacts.
455455
* @return This object.
456456
*/
457457
public CheckstyleExecutorRequest setLicenseArtifacts( List<Artifact> licenseArtifacts )
@@ -473,7 +473,7 @@ public List<Artifact> getConfigurationArtifacts()
473473
/**
474474
* Sets a list of artifacts, which may contain the checkstyle configuration.
475475
*
476-
* @param configArtifacts
476+
* @param configArtifacts List of artifacts.
477477
* @return This object.
478478
*/
479479
public CheckstyleExecutorRequest setConfigurationArtifacts( List<Artifact> configArtifacts )

src/main/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResults.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
/**
3232
* Object holding the references to the CheckstyleResults.
33+
* TODO: provide fallback to disk based storage if too many results.
3334
*
3435
* @author <a href="mailto:[email protected]">Joakim Erdfelt</a>
3536
* @version $Id$
36-
* @todo provide fallback to disk based storage if too many results.
3737
*/
3838
public class CheckstyleResults
3939
{

src/main/java/org/apache/maven/plugins/checkstyle/rss/DefaultCheckstyleRssGenerator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public class DefaultCheckstyleRssGenerator
4747
@Requirement
4848
private VelocityComponent velocityComponent;
4949

50-
/**
51-
* @see org.apache.maven.plugins.checkstyle.rss.CheckstyleRssGenerator#generateRSS(org.apache.maven.plugins.checkstyle.exec.CheckstyleResults)
52-
*/
50+
@Override
5351
public void generateRSS( CheckstyleResults results, CheckstyleRssGeneratorRequest checkstyleRssGeneratorRequest )
5452
throws MavenReportException
5553
{

src/main/java/org/apache/maven/plugins/checkstyle/rss/VelocityTemplate.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@
3535
/**
3636
* <p>
3737
* A component to work with VelocityTemplates from within plugins.
38-
* </p>
39-
*
40-
* <p/>
38+
* <p>
4139
* You will need to reference the velocity component as a parameter
4240
* in your plugin. Like this:
43-
* </p>
4441
* <pre>
4542
* /&#042;&#042;
4643
* &#042; Velocity Component
@@ -83,8 +80,8 @@ public VelocityComponent getVelocity()
8380
* @param template the velocity template to use.
8481
* @param context the velocity context map.
8582
* @throws VelocityException if the template was not found or any other Velocity exception.
86-
* @throws MojoExecutionException
87-
* @throws IOException
83+
* @throws MojoExecutionException if merging the velocity template failed.
84+
* @throws IOException if there was an error when writing to the output file.
8885
*/
8986
public void generate( String outputFilename, String template, Context context )
9087
throws VelocityException, MojoExecutionException, IOException

0 commit comments

Comments
 (0)