Skip to content

Commit c6c0884

Browse files
committed
Remove trailing dot after {@return …} because Javadoc already adds this dot.
Before this commit, we had two dots at the end of summary sentences in the generated Javadoc.
1 parent 2f6b811 commit c6c0884

19 files changed

+83
-81
lines changed

src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public abstract class AbstractCompilerMojo implements Mojo {
134134
protected String encoding;
135135

136136
/**
137-
* {@return the character set used for decoding bytes, or null for the platform default}.
137+
* {@return the character set used for decoding bytes, or null for the platform default}
138138
* No warning is emitted in the latter case because as of Java 18, the default is UTF-8,
139139
* i.e. the encoding is no longer platform-dependent.
140140
*/
@@ -947,31 +947,31 @@ protected AbstractCompilerMojo(PathScope compileScope) {
947947
}
948948

949949
/**
950-
* {@return the inclusion filters for the compiler, or an empty list for all Java source files}.
950+
* {@return the inclusion filters for the compiler, or an empty list for all Java source files}
951951
* The filter patterns are described in {@link java.nio.file.FileSystem#getPathMatcher(String)}.
952952
* If no syntax is specified, the default syntax is a derivative of "glob" compatible with the
953953
* behavior of Maven 3.
954954
*/
955955
protected abstract Set<String> getIncludes();
956956

957957
/**
958-
* {@return the exclusion filters for the compiler, or an empty list if none}.
958+
* {@return the exclusion filters for the compiler, or an empty list if none}
959959
* The filter patterns are described in {@link java.nio.file.FileSystem#getPathMatcher(String)}.
960960
* If no syntax is specified, the default syntax is a derivative of "glob" compatible with the
961961
* behavior of Maven 3.
962962
*/
963963
protected abstract Set<String> getExcludes();
964964

965965
/**
966-
* {@return the exclusion filters for the incremental calculation}.
966+
* {@return the exclusion filters for the incremental calculation}
967967
* Updated source files, if excluded by this filter, will not cause the project to be rebuilt.
968968
*
969969
* @see SourceFile#ignoreModification
970970
*/
971971
protected abstract Set<String> getIncrementalExcludes();
972972

973973
/**
974-
* {@return whether all includes/excludes matchers specified in the plugin configuration are empty}.
974+
* {@return whether all includes/excludes matchers specified in the plugin configuration are empty}
975975
* This method checks only the plugin configuration. It does not check the {@code <source>} elements.
976976
*/
977977
final boolean hasNoFileMatchers() {
@@ -981,14 +981,14 @@ && getExcludes().isEmpty()
981981
}
982982

983983
/**
984-
* {@return the destination directory (or class output directory) for class files}.
984+
* {@return the destination directory (or class output directory) for class files}
985985
* This directory will be given to the {@code -d} Java compiler option.
986986
*/
987987
@Nonnull
988988
protected abstract Path getOutputDirectory();
989989

990990
/**
991-
* {@return the {@code --source} argument for the Java compiler}.
991+
* {@return the {@code --source} argument for the Java compiler}
992992
* The default implementation returns the {@link #source} value.
993993
*/
994994
@Nullable
@@ -997,7 +997,7 @@ protected String getSource() {
997997
}
998998

999999
/**
1000-
* {@return the {@code --target} argument for the Java compiler}.
1000+
* {@return the {@code --target} argument for the Java compiler}
10011001
* The default implementation returns the {@link #target} value.
10021002
*/
10031003
@Nullable
@@ -1006,7 +1006,7 @@ protected String getTarget() {
10061006
}
10071007

10081008
/**
1009-
* {@return the {@code --release} argument for the Java compiler}.
1009+
* {@return the {@code --release} argument for the Java compiler}
10101010
* The default implementation returns the {@link #release} value.
10111011
*/
10121012
@Nullable
@@ -1015,7 +1015,7 @@ protected String getRelease() {
10151015
}
10161016

10171017
/**
1018-
* {@return the root directories of Java source code for the given scope}.
1018+
* {@return the root directories of Java source code for the given scope}
10191019
* This method ignores the deprecated {@link #compileSourceRoots} element.
10201020
*
10211021
* @param scope whether to get the directories for main code or for the test code
@@ -1025,7 +1025,7 @@ final Stream<SourceRoot> getSourceRoots(ProjectScope scope) {
10251025
}
10261026

10271027
/**
1028-
* {@return the root directories of the Java source files to compile, excluding empty directories}.
1028+
* {@return the root directories of the Java source files to compile, excluding empty directories}
10291029
* The list needs to be modifiable for allowing the addition of generated source directories.
10301030
* This is determined from the {@link #compileSourceRoots} plugin configuration if non-empty,
10311031
* or from {@code <source>} elements otherwise.
@@ -1044,7 +1044,7 @@ final List<SourceDirectory> getSourceDirectories(final Path outputDirectory) thr
10441044
}
10451045

10461046
/**
1047-
* {@return the path where to place generated source files created by annotation processing}.
1047+
* {@return the path where to place generated source files created by annotation processing}
10481048
*/
10491049
@Nullable
10501050
protected abstract Path getGeneratedSourcesDirectory();
@@ -1072,7 +1072,7 @@ String moduleOfPreviousExecution() throws IOException {
10721072
}
10731073

10741074
/**
1075-
* {@return whether the sources contain at least one {@code module-info.java} file}.
1075+
* {@return whether the sources contain at least one {@code module-info.java} file}
10761076
* Note that the sources may contain more than one {@code module-info.java} file
10771077
* if compiling a project with Module Source Hierarchy.
10781078
*
@@ -1101,7 +1101,7 @@ boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOExcepti
11011101
}
11021102

11031103
/**
1104-
* {@return the file where to dump the command-line when debug logging is enabled or when the compilation failed}.
1104+
* {@return the file where to dump the command-line when debug logging is enabled or when the compilation failed}
11051105
* For example, if the value is {@code "javac"}, then the Java compiler can be launched
11061106
* from the command-line by typing {@code javac @target/javac.args}.
11071107
* The debug file will contain the compiler options together with the list of source files to compile.
@@ -1115,7 +1115,7 @@ boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOExcepti
11151115
protected abstract String getDebugFileName();
11161116

11171117
/**
1118-
* {@return the debug file name with its path, or null if none}.
1118+
* {@return the debug file name with its path, or null if none}
11191119
* This method does not check if the debug file will be written, as the compilation result is not yet known.
11201120
*/
11211121
final Path getDebugFilePath() {
@@ -1222,7 +1222,7 @@ public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> li
12221222
}
12231223

12241224
/**
1225-
* {@return the compiler to use for compiling the code}.
1225+
* {@return the compiler to use for compiling the code}
12261226
* If {@link #fork} is {@code true}, the returned compiler will be a wrapper for a command line.
12271227
* Otherwise, it will be the compiler identified by {@link #compilerId} if a value was supplied,
12281228
* or the standard compiler provided with the Java platform otherwise.
@@ -1452,7 +1452,7 @@ private boolean isVersionEqualOrNewer(String sourceVersion) {
14521452
}
14531453

14541454
/**
1455-
* {@return the tool chain specified by the user in plugin parameters}.
1455+
* {@return the tool chain specified by the user in plugin parameters}
14561456
*/
14571457
private Optional<Toolchain> getToolchain() {
14581458
if (jdkToolchain != null) {
@@ -1498,8 +1498,9 @@ final String parseModuleInfoName(Path source) throws IOException {
14981498
}
14991499

15001500
/**
1501-
* {@return all dependencies grouped by the path types where to place them}. If the module-path contains
1502-
* any filename-based dependency and this MOJO is compiling the main code, then a warning will be logged.
1501+
* {@return all dependencies grouped by the path types where to place them}
1502+
* If the module-path contains any filename-based dependency and this <abbr>MOJO</abbr>
1503+
* is compiling the main code, then a warning will be logged.
15031504
*
15041505
* @param hasModuleDeclaration whether to allow placement of dependencies on the module-path.
15051506
* @throws IOException if an I/O error occurred while fetching dependencies
@@ -1606,7 +1607,7 @@ final void resolveProcessorPathEntries(Map<PathType, List<Path>> addTo) throws M
16061607
}
16071608

16081609
/**
1609-
* {@return whether an annotation processor seems to be present}.
1610+
* {@return whether an annotation processor seems to be present}
16101611
* This method is invoked if the user did not specified explicit incremental compilation options.
16111612
*
16121613
* @param strict whether to be conservative if the current Java version is older than 23

src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public Options parseParameters(final OptionChecker compiler) {
226226
}
227227

228228
/**
229-
* {@return the path where to place generated source files created by annotation processing on the main classes}.
229+
* {@return the path where to place generated source files created by annotation processing on the main classes}
230230
*/
231231
@Nullable
232232
@Override
@@ -235,31 +235,31 @@ protected Path getGeneratedSourcesDirectory() {
235235
}
236236

237237
/**
238-
* {@return the inclusion filters for the compiler, or an empty set for all Java source files}.
238+
* {@return the inclusion filters for the compiler, or an empty set for all Java source files}
239239
*/
240240
@Override
241241
protected Set<String> getIncludes() {
242242
return (includes != null) ? includes : Set.of();
243243
}
244244

245245
/**
246-
* {@return the exclusion filters for the compiler, or an empty set if none}.
246+
* {@return the exclusion filters for the compiler, or an empty set if none}
247247
*/
248248
@Override
249249
protected Set<String> getExcludes() {
250250
return (excludes != null) ? excludes : Set.of();
251251
}
252252

253253
/**
254-
* {@return the exclusion filters for the incremental calculation, or an empty set if none}.
254+
* {@return the exclusion filters for the incremental calculation, or an empty set if none}
255255
*/
256256
@Override
257257
protected Set<String> getIncrementalExcludes() {
258258
return (incrementalExcludes != null) ? incrementalExcludes : Set.of();
259259
}
260260

261261
/**
262-
* {@return the destination directory for main class files}.
262+
* {@return the destination directory for main class files}
263263
* If {@link #multiReleaseOutput} is true <em>(deprecated)</em>,
264264
* the output will be in a {@code META-INF/versions} subdirectory.
265265
*/
@@ -273,7 +273,7 @@ protected Path getOutputDirectory() {
273273
}
274274

275275
/**
276-
* {@return the file where to dump the command-line when debug is activated or when the compilation failed}.
276+
* {@return the file where to dump the command-line when debug is activated or when the compilation failed}
277277
*
278278
* @see #debugFileName
279279
*/
@@ -301,7 +301,7 @@ public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> li
301301
}
302302

303303
/**
304-
* {@return whether the project has at least one module-info file}.
304+
* {@return whether the project has at least one module-info file}
305305
* If no such file is found in the code to be compiled by this <abbr>MOJO</abbr> execution,
306306
* then this method searches in the multi-release codes compiled by previous executions.
307307
*
@@ -330,7 +330,7 @@ final boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOE
330330
}
331331

332332
/**
333-
* {@return the output directory of each target Java version}.
333+
* {@return the output directory of each target Java version}
334334
* By convention, {@link SourceVersion#RELEASE_0} stands for the base version.
335335
*
336336
* @throws IOException if this method needs to walk through directories and that operation failed
@@ -437,7 +437,7 @@ private String addImplicitDependencies(final ToolExecutor executor) throws IOExc
437437
}
438438

439439
/**
440-
* {@return the module name in a previous execution of the compiler plugin, or {@code null} if none}.
440+
* {@return the module name in a previous execution of the compiler plugin, or {@code null} if none}
441441
*
442442
* @deprecated For compatibility with the previous way to build multi-release JAR file.
443443
* May be removed after we drop support of the old way to do multi-release.

src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void logSummary() {
217217
}
218218

219219
/**
220-
* {@return the pattern for formatting the specified number followed by a label}.
220+
* {@return the pattern for formatting the specified number followed by a label}
221221
* The given number should be the widest number to format.
222222
* A margin of 4 spaces is added at the beginning of the line.
223223
*/

src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ List<SourceFile> getModifiedSources() {
772772
}
773773

774774
/**
775-
* {@return whether the given list of modified files should not cause a recompilation}.
775+
* {@return whether the given list of modified files should not cause a recompilation}
776776
* This method returns {@code true} if the given list is empty or contains only files
777777
* with the {@link SourceFile#ignoreModification} set to {@code true}.
778778
*

src/main/java/org/apache/maven/plugin/compiler/ModuleInfoPatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ private static void readQualified(StreamTokenizer reader, Map<String, Set<String
372372
}
373373

374374
/**
375-
* {@return the set of modules associated to the given package name}.
375+
* {@return the set of modules associated to the given package name}
376376
*
377377
* @param target the map where to store the set of modules
378378
* @param packageName the package name for which to get a set of modules
@@ -581,7 +581,7 @@ public ModuleInfoPatch patchWithSameReads(String otherModule) {
581581
}
582582

583583
/**
584-
* {@return the name of the module to patch, or null if unspecified and no default}.
584+
* {@return the name of the module to patch, or null if unspecified and no default}
585585
*/
586586
public String getModuleName() {
587587
return moduleName;

src/main/java/org/apache/maven/plugin/compiler/Options.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void format(final StringBuilder commandLine, final Appendable out) throws IOExce
418418
}
419419

420420
/**
421-
* {@return a string representatation of the options for debugging purposes}.
421+
* {@return a string representatation of the options for debugging purposes}
422422
*/
423423
@Override
424424
public String toString() {

src/main/java/org/apache/maven/plugin/compiler/PathFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th
157157
}
158158

159159
/**
160-
* {@return all source files found in the given root directories}.
160+
* {@return all source files found in the given root directories}
161161
* The include and exclude filters specified at construction time are applied.
162162
* Hidden directories are ignored, and symbolic links are followed.
163163
*

src/main/java/org/apache/maven/plugin/compiler/PathSelector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ private static PathMatcher[] matchers(final FileSystem fs, final String[] patter
473473
}
474474

475475
/**
476-
* {@return a potentially simpler matcher equivalent to this matcher}.
476+
* {@return a potentially simpler matcher equivalent to this matcher}
477477
*/
478478
@SuppressWarnings("checkstyle:MissingSwitchDefault")
479479
public PathMatcher simplify() {
@@ -505,7 +505,7 @@ public boolean matches(Path path) {
505505
}
506506

507507
/**
508-
* {@return whether the given file matches according to one of the given matchers}.
508+
* {@return whether the given file matches according to one of the given matchers}
509509
*/
510510
private static boolean isMatched(Path path, PathMatcher[] matchers) {
511511
for (PathMatcher matcher : matchers) {
@@ -554,7 +554,7 @@ private static void append(StringBuilder buffer, String label, String[] patterns
554554
}
555555

556556
/**
557-
* {@return a string representation for logging purposes}.
557+
* {@return a string representation for logging purposes}
558558
*/
559559
@Override
560560
public String toString() {

src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static Path outputDirectoryForReleases(Path outputDirectory) {
233233
}
234234

235235
/**
236-
* {@return the target version as an object from the Java tools API}.
236+
* {@return the target version as an object from the Java tools API}
237237
*
238238
* @param root the source directory for which to get the target version
239239
* @throws UnsupportedVersionException if the version string cannot be parsed
@@ -368,7 +368,7 @@ public Optional<Path> getModuleInfo() {
368368
}
369369

370370
/**
371-
* {@return the Java version of the sources in this directory if different than the base version}.
371+
* {@return the Java version of the sources in this directory if different than the base version}
372372
* The value returned by this method is related to the {@code META-INF/versions/} subdirectory in
373373
* the path returned by {@link #getOutputDirectory()}. If this method returns an empty value, then
374374
* there is no such subdirectory (which doesn't mean that the user did not specified a Java version).
@@ -379,7 +379,7 @@ public Optional<SourceVersion> getSpecificVersion() {
379379
}
380380

381381
/**
382-
* {@return the directory where to store the compilation results}.
382+
* {@return the directory where to store the compilation results}
383383
* This is the <abbr>MOJO</abbr> output directory potentially completed with
384384
* sub-directories for module name and {@code META-INF/versions} versioning.
385385
*/
@@ -409,15 +409,15 @@ public boolean equals(Object obj) {
409409
}
410410

411411
/**
412-
* {@return a hash code value for this root directory}.
412+
* {@return a hash code value for this root directory}
413413
*/
414414
@Override
415415
public int hashCode() {
416416
return Objects.hash(root, moduleName, release);
417417
}
418418

419419
/**
420-
* {@return a string representation of this root directory for debugging purposes}.
420+
* {@return a string representation of this root directory for debugging purposes}
421421
*/
422422
@Override
423423
public String toString() {

0 commit comments

Comments
 (0)