This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch deps in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit 8bb7b5b163661bf75929dc57ff538c6c33cb50bf Author: Elliotte Rusty Harold <elh...@ibiblio.org> AuthorDate: Fri Sep 19 06:37:23 2025 -0400 Follow Oracle Javadoc conventions --- .../plugin/compiler/AbstractCompilerMojo.java | 63 +++++++++------------- .../maven/plugin/compiler/ByteCodeTransformer.java | 1 - .../plugin/compiler/CompilationTaskSources.java | 8 +-- .../apache/maven/plugin/compiler/CompilerMojo.java | 24 ++++----- .../plugin/compiler/DependencyCoordinate.java | 3 +- .../maven/plugin/compiler/DependencyExclusion.java | 2 +- .../maven/plugin/compiler/DiagnosticLogger.java | 2 +- .../maven/plugin/compiler/ForkedCompiler.java | 2 +- .../apache/maven/plugin/compiler/ForkedTool.java | 2 +- .../maven/plugin/compiler/ForkedToolSources.java | 1 - .../maven/plugin/compiler/IncrementalBuild.java | 6 +-- .../plugin/compiler/ModuleDirectoryRemover.java | 8 +-- .../maven/plugin/compiler/ModuleInfoOverwrite.java | 4 +- .../org/apache/maven/plugin/compiler/Options.java | 3 +- .../apache/maven/plugin/compiler/PathFilter.java | 4 +- .../apache/maven/plugin/compiler/PathSelector.java | 1 - .../maven/plugin/compiler/SourceDirectory.java | 4 +- .../maven/plugin/compiler/SourcesForRelease.java | 2 +- .../maven/plugin/compiler/TestCompilerMojo.java | 17 +++--- .../apache/maven/plugin/compiler/ToolExecutor.java | 9 ++-- .../maven/plugin/compiler/ToolExecutorForTest.java | 6 +-- 21 files changed, 71 insertions(+), 101 deletions(-) diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java index c2f7a50..8d26f9b 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java @@ -228,7 +228,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * If non-empty, the project {@code <Source>} elements are ignored. This configuration option * should be used only when there is a need to override the project configuration. * - * @deprecated Replaced by the project-wide {@code <sources>} element. + * @deprecated replaced by the project-wide {@code <sources>} element */ @Parameter @Deprecated(since = "4.0.0") @@ -270,8 +270,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * <p>Note that {@code -J} options should be specified only if {@link #fork} is set to {@code true}.</p> * * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-J">javac -J</a> - * - * @deprecated Use {@link #compilerArgs} instead. + * @deprecated use {@link #compilerArgs} instead */ @Parameter @Deprecated(since = "4.0.0") @@ -354,9 +353,8 @@ public abstract class AbstractCompilerMojo implements Mojo { * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-processor-path">javac -processorpath</a> * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing">javac Annotation Processing</a> * @since 3.5 - * - * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to - * {@code processor}, {@code classpath-processor} or {@code modular-processor}. + * @deprecated replaced by ordinary dependencies with {@code <type>} element set to + * {@code processor}, {@code classpath-processor} or {@code modular-processor} */ @Parameter @Deprecated(since = "4.0.0") @@ -372,8 +370,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * </p> * * @since 3.12.0 - * - * @deprecated This flag is ignored. + * @deprecated this flag is ignored. * Replaced by ordinary dependencies with {@code <type>} element set to * {@code processor}, {@code classpath-processor} or {@code modular-processor}. */ @@ -432,8 +429,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * * @see #debuglevel * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-g">javac -g</a> - * - * @deprecated Setting this flag to {@code false} is replaced by {@code <debuglevel>none</debuglevel>}. + * @deprecated setting this flag to {@code false} is replaced by {@code <debuglevel>none</debuglevel>} */ @Deprecated(since = "4.0.0") @Parameter(property = "maven.compiler.debug", defaultValue = "true") @@ -462,7 +458,8 @@ public abstract class AbstractCompilerMojo implements Mojo { /** * Whether to optimize the compiled code using the compiler's optimization methods. - * @deprecated This property is ignored. + * + * @deprecated this property is ignored */ @Deprecated(forRemoval = true) @Parameter(property = "maven.compiler.optimize") @@ -533,7 +530,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * * <p>expression="${project.build.finalName}"</p> * - * @deprecated Bundling many class files into a single file should be done by other plugins. + * @deprecated bundling many class files into a single file should be done by other plugins */ @Parameter @Deprecated(since = "4.0.0", forRemoval = true) @@ -545,8 +542,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>). * * @since 3.12.0 - * - * @deprecated Not used by the compiler plugin since it does not generate archive. + * @deprecated not used by the compiler plugin since it does not generate archive */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(defaultValue = "${project.build.outputTimestamp}") @@ -630,8 +626,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * Whether to enable/disable incremental compilation feature. * * @since 3.1 - * - * @deprecated Replaced by {@link #incrementalCompilation}. + * @deprecated replaced by {@link #incrementalCompilation}. * A value of {@code true} in this old property is equivalent to {@code "dependencies,sources,rebuild-on-add"} * in the new property, and a value of {@code false} is equivalent to {@code "classes"}. */ @@ -753,9 +748,8 @@ public abstract class AbstractCompilerMojo implements Mojo { * Version of the compiler to use if {@link #fork} is set to {@code true}. * Examples! "1.3", "1.5". * - * @deprecated This parameter is no longer used by the underlying compilers. - * * @see #fork + * @deprecated this parameter is no longer used by the underlying compilers */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(property = "maven.compiler.compilerVersion") @@ -767,8 +761,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.compiler/javax/tools/package-summary.html">New API</a> * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/api/jdk.compiler/com/sun/tools/javac/package-summary.html">Legacy API</a> * @since 3.13 - * - * @deprecated Ignored because the compiler plugin now always use the {@code javax.tools} API. + * @deprecated ignored because the compiler plugin now always use the {@code javax.tools} API */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(property = "maven.compiler.forceLegacyJavacApi") @@ -778,8 +771,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * Whether to use legacy compiler API. * * @since 3.0 - * - * @deprecated Ignored because {@code java.lang.Compiler} has been deprecated and removed from the JDK. + * @deprecated ignored because {@code java.lang.Compiler} has been deprecated and removed from the JDK */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(property = "maven.compiler.forceJavacCompilerUse") @@ -797,8 +789,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * Note this parameter value depends on the OS/JDK you are using, but the default value should work on most of env. * * @since 2.5 - * - * @deprecated Not supported anymore. The reuse of {@link JavaFileManager} instance is plugin implementation details. + * @deprecated not supported anymore. The reuse of {@link JavaFileManager} instance is plugin implementation details. */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(property = "maven.compiler.compilerReuseStrategy") @@ -806,8 +797,7 @@ public abstract class AbstractCompilerMojo implements Mojo { /** * @since 2.5 - * - * @deprecated Deprecated as a consequence of {@link #compilerReuseStrategy} deprecation. + * @deprecated deprecated as a consequence of {@link #compilerReuseStrategy} deprecation */ @Deprecated(since = "4.0.0", forRemoval = true) @Parameter(property = "maven.compiler.skipMultiThreadWarning") @@ -860,7 +850,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * Path to a file where to cache information about the last incremental build. * This is used when "incremental" builds are enabled for detecting additions * or removals of source files, or changes in plugin configuration. - * This file should be in the output directory and can be deleted at any time + * This file should be in the output directory and can be deleted at any time. */ @Parameter( defaultValue = @@ -1048,10 +1038,8 @@ public abstract class AbstractCompilerMojo implements Mojo { * * @return the module name in a previous execution of the compiler plugin, or {@code null} if none * @throws IOException if this method needs to walk through directories and that operation failed - * * @see CompilerMojo#addImplicitDependencies(ToolExecutor) - * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Deprecated(since = "4.0.0") @@ -1172,9 +1160,9 @@ public abstract class AbstractCompilerMojo implements Mojo { * * @param listener where to send compilation warnings, or {@code null} for the Maven logger * @return the task to execute for compiling the project using the configuration in this <abbr>MOJO</abbr> - * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> * @throws IOException if an error occurred while creating the output directory or scanning the source directories * @throws MavenException if an error occurred while fetching dependencies + * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> */ public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException { var executor = new ToolExecutor(this, listener); @@ -1255,7 +1243,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * The {@link #release} parameter is excluded because it is handled in a special way * in order to support the compilation of multi-version projects. * - * @param compiler the tools to use for verifying the validity of options + * @param compiler the tools to use for verifying the validity of options * @return the options after validation */ public Options parseParameters(final OptionChecker compiler) { @@ -1467,9 +1455,9 @@ public abstract class AbstractCompilerMojo implements Mojo { * {@return all dependencies grouped by the path types where to place them}. If the module-path contains * any filename-based dependency and this MOJO is compiling the main code, then a warning will be logged. * - * @param hasModuleDeclaration whether to allow placement of dependencies on the module-path. + * @param hasModuleDeclaration whether to allow placement of dependencies on the module-path * @throws IOException if an I/O error occurred while fetching dependencies - * @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O. + * @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O */ final DependencyResolverResult resolveDependencies(boolean hasModuleDeclaration) throws IOException { DependencyResolver resolver = session.getService(DependencyResolver.class); @@ -1531,9 +1519,8 @@ public abstract class AbstractCompilerMojo implements Mojo { * * @param addTo the modifiable map and lists where to append more paths to annotation processor dependencies * @throws MojoException if an error occurred while resolving the dependencies - * - * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to - * {@code processor}, {@code classpath-processor} or {@code modular-processor}. + * @deprecated replaced by ordinary dependencies with {@code <type>} element set to + * {@code processor}, {@code classpath-processor} or {@code modular-processor} */ @Deprecated(since = "4.0.0") final void resolveProcessorPathEntries(Map<PathType, List<Path>> addTo) throws MojoException { @@ -1760,7 +1747,7 @@ public abstract class AbstractCompilerMojo implements Mojo { * The check for the project directory tree (starting from the root of all sub-projects) is for avoiding * to relativize the paths to JAR files in the Maven local repository for example. * - * @param file the path to make relative to the base directory + * @param file the path to make relative to the base directory * @return the given path, potentially relative to the base directory */ private Path relativize(Path file) { diff --git a/src/main/java/org/apache/maven/plugin/compiler/ByteCodeTransformer.java b/src/main/java/org/apache/maven/plugin/compiler/ByteCodeTransformer.java index 7498131..ff00dc3 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ByteCodeTransformer.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ByteCodeTransformer.java @@ -54,7 +54,6 @@ final class ByteCodeTransformer { * * @param originalBytecode the byte code to patch * @return the patched byte code, or {@code null} if no change is needed - * * @see <a href="https://issues.apache.org/jira/browse/MCOMPILER-542">MCOMPILER-542</a> * @see <a href="https://bugs.openjdk.org/browse/JDK-8318913">JDK-8318913</a> * @see #MODULE_VERSION_FIX diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilationTaskSources.java b/src/main/java/org/apache/maven/plugin/compiler/CompilationTaskSources.java index 69146a7..9991bec 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilationTaskSources.java +++ b/src/main/java/org/apache/maven/plugin/compiler/CompilationTaskSources.java @@ -37,7 +37,7 @@ class CompilationTaskSources { /** * Creates a new compilation task. * - * @param files the files to compile. + * @param files the files to compile */ CompilationTaskSources(List<Path> files) { this.files = files; @@ -47,9 +47,9 @@ class CompilationTaskSources { * Executes the compilation task. Subclasses can override this method is they need to perform * pre-compilation or post-compilation tasks. * - * @param task the compilation task - * @return whether the compilation was successful. - * @throws IOException if an initialization or cleaner task was required and failed. + * @param task the compilation task + * @return whether the compilation was successful + * @throws IOException if an initialization or cleaner task was required and failed */ boolean compile(JavaCompiler.CompilationTask task) throws IOException { return task.call(); diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java index 0127d86..8430aea 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java @@ -124,8 +124,7 @@ public class CompilerMojo extends AbstractCompilerMojo { * </p> * * @since 3.7.1 - * - * @deprecated Replaced by specifying the {@code <targetVersion>} value inside a {@code <source>} element. + * @deprecated replaced by specifying the {@code <targetVersion>} value inside a {@code <source>} element */ @Parameter @Deprecated(since = "4.0.0") @@ -164,7 +163,7 @@ public class CompilerMojo extends AbstractCompilerMojo { * When using the recommended {@code <sources>} approach, the plugins are designed to work * with the directory layout produced by {@code javac} instead of fighting against it. * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Deprecated(since = "4.0.0") @@ -182,7 +181,7 @@ public class CompilerMojo extends AbstractCompilerMojo { * If {@link #skipMain} is {@code true}, then this method logs a message and does nothing else. * Otherwise, this method executes the steps described in the method of the parent class. * - * @throws MojoException if the compiler cannot be run. + * @throws MojoException if the compiler cannot be run */ @Override public void execute() throws MojoException { @@ -209,7 +208,7 @@ public class CompilerMojo extends AbstractCompilerMojo { /** * Parses the parameters declared in the <abbr>MOJO</abbr>. * - * @param compiler the tools to use for verifying the validity of options + * @param compiler the tools to use for verifying the validity of options * @return the options after validation */ @Override @@ -281,9 +280,9 @@ public class CompilerMojo extends AbstractCompilerMojo { * Creates a new task for compiling the main classes. * * @param listener where to send compilation warnings, or {@code null} for the Maven logger - * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> * @return the task to execute for compiling the main code using the configuration in this <abbr>MOJO</abbr> * @throws IOException if an error occurred while creating the output directory or scanning the source directories + * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> */ @Override public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException { @@ -301,8 +300,7 @@ public class CompilerMojo extends AbstractCompilerMojo { * * @param roots root directories of the sources to compile * @throws IOException if this method needed to read a module descriptor and failed - * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Override @@ -328,8 +326,7 @@ public class CompilerMojo extends AbstractCompilerMojo { * By convention, {@link SourceVersion#RELEASE_0} stands for the base version. * * @throws IOException if this method needs to walk through directories and that operation failed - * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Deprecated(since = "4.0.0") @@ -367,11 +364,10 @@ public class CompilerMojo extends AbstractCompilerMojo { * module name, with no executor to modify. The module name found by this method is specific to * the way that projects are organized when {@link #multiReleaseOutput} is {@code true}.</p> * - * @param executor the executor where to add implicit dependencies, or {@code null} if none + * @param executor the executor where to add implicit dependencies, or {@code null} if none * @return the module name, or {@code null} if none * @throws IOException if this method needs to walk through directories and that operation failed - * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Deprecated(since = "4.0.0") @@ -433,7 +429,7 @@ public class CompilerMojo extends AbstractCompilerMojo { /** * {@return the module name in a previous execution of the compiler plugin, or {@code null} if none}. * - * @deprecated For compatibility with the previous way to build multi-release JAR file. + * @deprecated for compatibility with the previous way to build multi-release JAR file. * May be removed after we drop support of the old way to do multi-release. */ @Override diff --git a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java index bbc52ea..cd291a6 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java +++ b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java @@ -36,8 +36,7 @@ import org.apache.maven.api.services.DependencyCoordinatesFactoryRequest; * * @author Andreas Gudian * @since 3.4 - * - * @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated. + * @deprecated used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated */ @Deprecated(since = "4.0.0") public final class DependencyCoordinate { diff --git a/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java b/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java index 6a321f1..82b872c 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java +++ b/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java @@ -23,7 +23,7 @@ import java.util.Objects; /** * Simple representation of a Maven dependency exclusion. * - * @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated. + * @deprecated used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated */ @Deprecated(since = "4.0.0") public final class DependencyExclusion { diff --git a/src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.java b/src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.java index 9af2e3f..9a99b3e 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.java +++ b/src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.java @@ -93,7 +93,7 @@ final class DiagnosticLogger implements DiagnosticListener<JavaFileObject> { /** * Makes the given file relative to the base directory. * - * @param file the path to make relative to the base directory + * @param file the path to make relative to the base directory * @return the given path, potentially relative to the base directory */ private String relativize(String file) { diff --git a/src/main/java/org/apache/maven/plugin/compiler/ForkedCompiler.java b/src/main/java/org/apache/maven/plugin/compiler/ForkedCompiler.java index 07b2d2c..444c56d 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ForkedCompiler.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ForkedCompiler.java @@ -38,7 +38,7 @@ final class ForkedCompiler extends ForkedTool implements JavaCompiler { /** * Creates a new forked compiler. * - * @param mojo the MOJO from which to get the configuration + * @param mojo the MOJO from which to get the configuration */ ForkedCompiler(final AbstractCompilerMojo mojo) { super(mojo); diff --git a/src/main/java/org/apache/maven/plugin/compiler/ForkedTool.java b/src/main/java/org/apache/maven/plugin/compiler/ForkedTool.java index 1a774a5..6e18c8f 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ForkedTool.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ForkedTool.java @@ -65,7 +65,7 @@ class ForkedTool implements Tool, OptionChecker { /** * Creates a new forked compiler. * - * @param mojo the MOJO from which to get the configuration + * @param mojo the MOJO from which to get the configuration */ ForkedTool(final AbstractCompilerMojo mojo) { basedir = mojo.basedir; diff --git a/src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.java b/src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.java index c34bd35..d342e9c 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.java @@ -55,7 +55,6 @@ import org.apache.maven.api.PathType; * Source files for a call to {@code javac} or {@code javadoc} command to be executed as a separated process. * * @author Martin Desruisseaux - * * @see ForkedCompiler */ final class ForkedToolSources implements StandardJavaFileManager { diff --git a/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java b/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java index 5e3083b..425021a 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java +++ b/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java @@ -534,7 +534,6 @@ final class IncrementalBuild { * * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild * @throws IOException if an error occurred while deleting output files of the previous build - * * @see Aspect#SOURCES */ String inputFileTreeChanges() throws IOException { @@ -629,7 +628,6 @@ final class IncrementalBuild { * @param changeTime the time at which a file is considered as changed * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild * @throws IOException if an error occurred while scanning the directories - * * @see Aspect#DEPENDENCIES */ String dependencyChanges(Iterable<List<Path>> dependencies, Collection<String> fileExtensions) throws IOException { @@ -678,7 +676,6 @@ final class IncrementalBuild { * * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild * @throws IOException if an error occurred while loading the cache file - * * @see Aspect#OPTIONS */ String optionChanges() throws IOException { @@ -713,7 +710,6 @@ final class IncrementalBuild { * * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild * @throws IOException if an error occurred while reading the time stamp of an output file - * * @see Aspect#CLASSES */ String markNewOrModifiedSources() throws IOException { @@ -762,7 +758,7 @@ final class IncrementalBuild { * This method returns {@code true} if the given list is empty or contains only files * with the {@link SourceFile#ignoreModification} set to {@code true}. * - * @param sourceFiles return value of {@link #getModifiedSources()}. + * @param sourceFiles return value of {@link #getModifiedSources()} */ static boolean isEmptyOrIgnorable(List<SourceFile> sourceFiles) { return !sourceFiles.stream().anyMatch((s) -> !s.ignoreModification); diff --git a/src/main/java/org/apache/maven/plugin/compiler/ModuleDirectoryRemover.java b/src/main/java/org/apache/maven/plugin/compiler/ModuleDirectoryRemover.java index 878b603..2e96634 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ModuleDirectoryRemover.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ModuleDirectoryRemover.java @@ -54,8 +54,8 @@ final class ModuleDirectoryRemover implements Closeable { /** * Temporarily renames the given output directory for matching the layout of {@code javac} output. * - * @param outputDirectory the output directory (must exist) - * @param moduleName the name of the module + * @param outputDirectory the output directory (must exist) + * @param moduleName the name of the module * @throws IOException if an error occurred while renaming the output directory */ private ModuleDirectoryRemover(Path outputDirectory, String moduleName) throws IOException { @@ -68,8 +68,8 @@ final class ModuleDirectoryRemover implements Closeable { /** * Temporarily renames the given output directory for matching the layout of {@code javac} output. * - * @param outputDirectory the output directory (must exist) - * @param moduleName the name of the module, or {@code null} if none + * @param outputDirectory the output directory (must exist) + * @param moduleName the name of the module, or {@code null} if none * @return a handler for restoring the directory to its original name, or {@code null} if there is no renaming * @throws IOException if an error occurred while renaming the output directory */ diff --git a/src/main/java/org/apache/maven/plugin/compiler/ModuleInfoOverwrite.java b/src/main/java/org/apache/maven/plugin/compiler/ModuleInfoOverwrite.java index a83a5e2..da29301 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ModuleInfoOverwrite.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ModuleInfoOverwrite.java @@ -108,7 +108,7 @@ final class ModuleInfoOverwrite implements Runnable { * to temporarily remove {@code module-info.class} from the test directory * (otherwise {@code javac} does not seem to consider that we are patching a module). * - * @throws IOException if an error occurred while renaming the file. + * @throws IOException if an error occurred while renaming the file */ private void substitute() throws IOException { Files.move(testSourceFile, savedSourceFile); @@ -123,7 +123,7 @@ final class ModuleInfoOverwrite implements Runnable { /** * Restores the {@code module-info} file. * - * @throws IOException if an error occurred while renaming the file. + * @throws IOException if an error occurred while renaming the file */ void restore() throws IOException { if (shutdownHook != null) { diff --git a/src/main/java/org/apache/maven/plugin/compiler/Options.java b/src/main/java/org/apache/maven/plugin/compiler/Options.java index 47b5b61..ddc33c5 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/Options.java +++ b/src/main/java/org/apache/maven/plugin/compiler/Options.java @@ -363,8 +363,7 @@ public final class Options { * This is used for user-specified arguments. * * @param arguments the arguments to add, or {@code null} if none - * - * @deprecated Use {@link #addUnchecked(List)} instead. This method does not check for quoted strings. + * @deprecated use {@link #addUnchecked(List)} instead. This method does not check for quoted strings. */ @Deprecated(since = "4.0.0") void addUnchecked(String arguments) { diff --git a/src/main/java/org/apache/maven/plugin/compiler/PathFilter.java b/src/main/java/org/apache/maven/plugin/compiler/PathFilter.java index 7f1995d..8e2fe71 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/PathFilter.java +++ b/src/main/java/org/apache/maven/plugin/compiler/PathFilter.java @@ -131,8 +131,8 @@ final class PathFilter extends SimpleFileVisitor<Path> { * Invoked for a file in a directory. If the given file passes the include/exclude filters, * then it is added to the list of source files. * - * @param file the source file to test - * @param attrs the file basic attributes + * @param file the source file to test + * @param attrs the file basic attributes * @return {@link FileVisitResult#CONTINUE} */ @Override diff --git a/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java b/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java index 509bfde..23c30ea 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java +++ b/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java @@ -59,7 +59,6 @@ import java.util.Set; * * @author Benjamin Bentmann * @author Martin Desruisseaux - * * @see java.nio.file.FileSystem#getPathMatcher(String) */ final class PathSelector implements PathMatcher { diff --git a/src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.java b/src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.java index e89c01f..24a6da0 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.java +++ b/src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.java @@ -163,9 +163,9 @@ final class SourceDirectory { * @param excludes patterns for excluding files below the root directory, or an empty list for no exclusion * @param fileKind kind of source files in this directory (usually {@code SOURCE}) * @param moduleName name of the module for which source directories are provided, or {@code null} if none - * @param release Java release for which source directories are provided, or {@code null} for the default release + * @param release java release for which source directories are provided, or {@code null} for the default release * @param outputDirectory the directory where to store the compilation results - * @param outputFileKind Kind of output files in the output directory (usually {@ codeCLASS}) + * @param outputFileKind kind of output files in the output directory (usually {@ codeCLASS}) */ @SuppressWarnings("checkstyle:ParameterNumber") private SourceDirectory( diff --git a/src/main/java/org/apache/maven/plugin/compiler/SourcesForRelease.java b/src/main/java/org/apache/maven/plugin/compiler/SourcesForRelease.java index 017cb95..0ed0cc9 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/SourcesForRelease.java +++ b/src/main/java/org/apache/maven/plugin/compiler/SourcesForRelease.java @@ -103,7 +103,7 @@ final class SourcesForRelease implements Closeable { * Adds the given source file to this collection of source files. * The value of {@code source.directory.release}, if not null, must be equal to {@link #release}. * - * @param source the source file to add. + * @param source the source file to add */ void add(SourceFile source) { var directory = source.directory; diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java index fa5ac6c..ff543d5 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java @@ -115,7 +115,7 @@ public class TestCompilerMojo extends AbstractCompilerMojo { protected String testTarget; /** - * the {@code --release} argument for the test Java compiler + * The {@code --release} argument for the test Java compiler. * * @see CompilerMojo#release * @since 3.6 @@ -137,9 +137,8 @@ public class TestCompilerMojo extends AbstractCompilerMojo { /** * The arguments to be passed to test compiler. * - * @deprecated Replaced by {@link #testCompilerArgs} for consistency with the main phase. - * * @since 2.1 + * @deprecated replaced by {@link #testCompilerArgs} for consistency with the main phase */ @Parameter @Deprecated(since = "4.0.0") @@ -150,10 +149,9 @@ public class TestCompilerMojo extends AbstractCompilerMojo { * If this parameter is specified, it replaces {@link #compilerArgument}. * Otherwise, the {@code compilerArgument} parameter is used. * - * @deprecated Use {@link #testCompilerArgs} instead. - * * @see CompilerMojo#compilerArgument * @since 2.1 + * @deprecated use {@link #testCompilerArgs} instead */ @Parameter @Deprecated(since = "4.0.0") @@ -186,8 +184,7 @@ public class TestCompilerMojo extends AbstractCompilerMojo { * Dependencies are also placed on the class-path, unless their type is {@code module-jar}. * * @since 3.11 - * - * @deprecated Use {@code "claspath-jar"} dependency type instead, and avoid {@code module-info.java} in tests. + * @deprecated use {@code "claspath-jar"} dependency type instead, and avoid {@code module-info.java} in tests */ @Deprecated(since = "4.0.0") @Parameter(defaultValue = "true") @@ -240,7 +237,7 @@ public class TestCompilerMojo extends AbstractCompilerMojo { * If {@link #skip} is {@code true}, then this method logs a message and does nothing else. * Otherwise, this method executes the steps described in the method of the parent class. * - * @throws MojoException if the compiler cannot be run. + * @throws MojoException if the compiler cannot be run */ @Override public void execute() throws MojoException { @@ -254,7 +251,7 @@ public class TestCompilerMojo extends AbstractCompilerMojo { /** * Parses the parameters declared in the <abbr>MOJO</abbr>. * - * @param compiler the tools to use for verifying the validity of options + * @param compiler the tools to use for verifying the validity of options * @return the options after validation */ @Override @@ -414,9 +411,9 @@ public class TestCompilerMojo extends AbstractCompilerMojo { * Creates a new task for compiling the test classes. * * @param listener where to send compilation warnings, or {@code null} for the Maven logger - * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> * @return the task to execute for compiling the tests using the configuration in this <abbr>MOJO</abbr> * @throws IOException if an error occurred while creating the output directory or scanning the source directories + * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr> */ @Override public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException { diff --git a/src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java b/src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java index 4177459..7d10dd2 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java @@ -194,10 +194,9 @@ public class ToolExecutor { * * @param mojo the <abbr>MOJO</abbr> from which to take a snapshot * @param listener where to send compilation warnings, or {@code null} for the Maven logger - * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr> * @throws IOException if an error occurred while creating the output directory or scanning the source directories * @throws MavenException if an error occurred while fetching dependencies - * + * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr> * @see AbstractCompilerMojo#createExecutor(DiagnosticListener) */ @SuppressWarnings("deprecation") @@ -301,8 +300,8 @@ public class ToolExecutor { * * @param mojo the <abbr>MOJO</abbr> from which to take the incremental build configuration * @param configuration the options which should match the options used during the last build - * @throws IOException if an error occurred while accessing the cache file or walking through the directory tree * @return whether there is at least one file to recompile + * @throws IOException if an error occurred while accessing the cache file or walking through the directory tree */ public boolean applyIncrementalBuild(final AbstractCompilerMojo mojo, final Options configuration) throws IOException { @@ -363,7 +362,7 @@ public class ToolExecutor { * The returned list is intentionally live: elements can be added or removed * from the list for changing the state of this executor. * - * @param pathType type of path for which to get the dependencies + * @param pathType type of path for which to get the dependencies */ protected List<Path> dependencies(PathType pathType) { return dependencies.computeIfAbsent(pathType, (key) -> new ArrayList<>()); @@ -450,7 +449,7 @@ public class ToolExecutor { * * @param moduleName the module name, or an empty string if not explicitly specified * @return the specified module name, or an inferred module name if available, or an empty string - * @throws IOException if the module descriptor cannot be read. + * @throws IOException if the module descriptor cannot be read */ String inferModuleNameIfMissing(String moduleName) throws IOException { return moduleName; diff --git a/src/main/java/org/apache/maven/plugin/compiler/ToolExecutorForTest.java b/src/main/java/org/apache/maven/plugin/compiler/ToolExecutorForTest.java index 6be8b69..9a0057c 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/ToolExecutorForTest.java +++ b/src/main/java/org/apache/maven/plugin/compiler/ToolExecutorForTest.java @@ -115,7 +115,7 @@ class ToolExecutorForTest extends ToolExecutor { * We keep that directory when the project is configured with the new {@code <source>} element, * but have to remove it for compatibility reason if the project is compiled in the old way. * - * @deprecated Exists only for compatibility with the Maven 3 way to do a modular project. + * @deprecated exists only for compatibility with the Maven 3 way to do a modular project. * Is likely to cause confusion, for example with incremental builds. * New projects should use the {@code <source>} elements instead. */ @@ -128,8 +128,8 @@ class ToolExecutorForTest extends ToolExecutor { * * @param mojo the <abbr>MOJO</abbr> from which to take a snapshot * @param listener where to send compilation warnings, or {@code null} for the Maven logger - * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr> * @throws IOException if an error occurred while creating the output directory or scanning the source directories + * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr> */ @SuppressWarnings("deprecation") ToolExecutorForTest(TestCompilerMojo mojo, DiagnosticListener<? super JavaFileObject> listener) throws IOException { @@ -208,7 +208,7 @@ class ToolExecutorForTest extends ToolExecutor { * This method reads the module descriptor when first needed and caches the result. * This used if the user did not specified an explicit {@code <module>} element in the sources. * - * @throws IOException if the module descriptor cannot be read. + * @throws IOException if the module descriptor cannot be read */ private String getMainModuleName() throws IOException { if (moduleName == null) {