Skip to content

Commit e6ab16e

Browse files
authored
[MJAVADOC-757] fix Javadoc warnings (#212)
* [MJAVADOC-757] fix Javadoc warnings
1 parent c5d00d6 commit e6ab16e

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787

8888
/**
8989
* Abstract class to fix Javadoc documentation and tags in source files.
90-
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags
91-
* Can Be Used</a>.
90+
*
91+
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags Can Be Used</a>
9292
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
9393
* @since 2.6
9494
*/

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,8 +1026,8 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
10261026
private boolean keywords;
10271027

10281028
/**
1029-
* Creates links to existing javadoc-generated documentation of external referenced classes.
1030-
* <br>
1029+
* Creates links to existing javadoc-generated documentation of external referenced classes.<p>
1030+
*
10311031
* <b>Notes</b>:
10321032
* <ol>
10331033
* <li>only used if {@code isOffline} is set to <code>false</code>.</li>
@@ -1039,12 +1039,12 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
10391039
* &lt;links&gt;
10401040
* </pre>
10411041
* will be used because <code>https://docs.oracle.com/en/java/javase/17/docs/api/element-list</code> exists.</li>
1042-
* <li>if {@link #detectLinks} is defined, the links between the project dependencies are
1042+
* <li>If {@link #detectLinks} is defined, the links between the project dependencies are
10431043
* automatically added.</li>
1044-
* <li>if {@link #detectJavaApiLink} is defined, a Java API link, based on the Java version of the
1044+
* <li>If {@link #detectJavaApiLink} is defined, a Java API link, based on the Java version of the
10451045
* project's sources, will be added automatically.</li>
10461046
* </ol>
1047-
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option link</a>.
1047+
* @see <a href=https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options>Doclet option link</a>
10481048
*/
10491049
@Parameter(property = "links")
10501050
protected ArrayList<String> links;
@@ -1682,7 +1682,7 @@ protected MavenProject getProject() {
16821682
/**
16831683
* @param p not null maven project
16841684
* @return the list of directories where compiled classes are placed for the given project. These dirs are
1685-
* added in the javadoc classpath.
1685+
* added to the javadoc classpath.
16861686
*/
16871687
protected List<File> getProjectBuildOutputDirs(MavenProject p) {
16881688
if (StringUtils.isEmpty(p.getBuild().getOutputDirectory())) {
@@ -1693,10 +1693,8 @@ protected List<File> getProjectBuildOutputDirs(MavenProject p) {
16931693
}
16941694

16951695
/**
1696-
* Either returns the attached artifact file or outputDirectory
1697-
*
1698-
* @param project
1699-
* @return
1696+
* @param project the project in which to find a classes file
1697+
* @return null, the attached artifact file, or outputDirectory.
17001698
*/
17011699
protected File getClassesFile(MavenProject project) {
17021700
if (!isAggregator() && isTest()) {
@@ -6026,8 +6024,7 @@ protected void failOnError(String prefix, Exception e) throws MojoExecutionExcep
60266024
}
60276025

60286026
/**
6029-
*
6030-
* @return List of projects to be part of aggregated javadoc
6027+
* @return list of projects to be part of aggregated javadoc
60316028
*/
60326029
private List<MavenProject> getAggregatedProjects() {
60336030
if (this.reactorProjects == null) {
@@ -6046,8 +6043,8 @@ private List<MavenProject> getAggregatedProjects() {
60466043
}
60476044

60486045
/**
6049-
*
6050-
* @return <code>true</code> if the module need to be skipped from aggregate generation
6046+
* @param mavenProject the project that might be skipped
6047+
* @return <code>true</code> if the project needs to be skipped from aggregate generation
60516048
*/
60526049
protected boolean isSkippedModule(MavenProject mavenProject) {
60536050
if (this.skippedModules == null || this.skippedModules.isEmpty()) {
@@ -6058,8 +6055,8 @@ protected boolean isSkippedModule(MavenProject mavenProject) {
60586055
}
60596056

60606057
/**
6061-
*
6062-
* @return <code>true</code> if the pom configuration skip javadoc generation for the project
6058+
* @param mavenProject the project that might be skipped
6059+
* @return <code>true</code> if the pom configuration skips javadoc generation for the project
60636060
*/
60646061
protected boolean isSkippedJavadoc(MavenProject mavenProject) {
60656062
String property = mavenProject.getProperties().getProperty("maven.javadoc.skip");

src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,10 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
393393
* Convenience method that gets the files to be included in the javadoc.
394394
*
395395
* @param sourceDirectory the directory where the source files are located
396-
* @param excludePackages the packages to be excluded in the javadocs
397-
* @param sourceFileIncludes files to include.
398-
* @param sourceFileExcludes files to exclude.
396+
* @param sourceFileIncludes files to include
397+
* @param sourceFileExcludes files to exclude
398+
* @param excludePackages packages to be excluded from the javadocs
399+
* @return the files from which javadoc should be generated
399400
*/
400401
protected static List<String> getFilesFromSource(
401402
File sourceDirectory,

src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class ResourcesBundleMojo extends AbstractJavadocMojo {
6262

6363
/**
6464
* Base name of artifacts produced by this project. This will be combined with
65-
* {@link ResourcesBundleMojo#getAttachmentClassifier()} to produce the name for this bundle
65+
* {@link AbstractJavadocMojo#getAttachmentClassifier()} to produce the name for this bundle
6666
* jar.
6767
*/
6868
@Parameter(defaultValue = "${project.build.finalName}", readonly = true)

src/main/java/org/apache/maven/plugins/javadoc/TestFixJavadocMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333

3434
/**
3535
* Fix Javadoc documentation and tags for the <code>Test Java code</code> for the project.
36-
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags Can
37-
* Be Used</a>.
36+
*
37+
* @see <a href=https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used>Where Tags Can Be Used</a>
3838
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
3939
* @since 2.6
4040
*/

0 commit comments

Comments
 (0)