From 066b6ed1806c8b251e5814c7b9d69e39d1f29555 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 27 Jan 2026 08:12:09 -0500 Subject: [PATCH 1/3] Remove unneeded code --- .../org/apache/maven/plugin/compiler/IncrementalBuild.java | 2 +- .../java/org/apache/maven/plugin/compiler/PathSelector.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 f2e162467..895b8cde9 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java +++ b/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java @@ -495,7 +495,7 @@ private Map loadCache() throws IOException { * @param omitted whether the output file has not be generated by the compiler (e.g. {@code package-info.class}) * @param lastModified last modification times of the source file during the previous build */ - private static record SourceInfo( + private record SourceInfo( Path sourceDirectory, Path outputDirectory, Path outputFile, boolean omitted, long lastModified) { /** * Deletes all output files associated to the given source file. If the output file is a {@code .class} file, 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 748d3841b..e2fcc5a15 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java +++ b/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java @@ -212,12 +212,12 @@ private static Collection effectiveExcludes(Collection excludes, } prefixes = sortByLength(prefixes, false); suffixes = sortByLength(suffixes, true); + /* - * Keep only the exclude which start with one of the prefixes and end with one of the suffixes. - * Note that a prefix or suffix may be the empty string, which match everything. + * Keep only the excludes which start with one of the prefixes and end with one of the suffixes. + * Note that a prefix or suffix may be the empty string, which matches everything. */ final Iterator it = excludes.iterator(); - nextExclude: while (it.hasNext()) { final String exclude = it.next(); final int s = exclude.indexOf(':'); From ced4d100d9c03e394b149f43193185521ce2cf81 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 27 Jan 2026 08:13:49 -0500 Subject: [PATCH 2/3] javadoc --- .../org/apache/maven/plugin/compiler/IncrementalBuild.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 895b8cde9..849ebd290 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java +++ b/src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java @@ -492,8 +492,8 @@ private Map loadCache() throws IOException { * @param sourceDirectory root directory of the source file * @param outputDirectory output directory of the compiled file * @param outputFile the output file if it was explicitly specified, or {@code null} if it can be inferred - * @param omitted whether the output file has not be generated by the compiler (e.g. {@code package-info.class}) - * @param lastModified last modification times of the source file during the previous build + * @param omitted whether the output file has not been generated by the compiler (e.g. {@code package-info.class}) + * @param lastModified last modification time of the source file during the previous build */ private record SourceInfo( Path sourceDirectory, Path outputDirectory, Path outputFile, boolean omitted, long lastModified) { From ce5bb4048d6433e146a0f2cf782cc8c89e12a89b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 27 Jan 2026 08:19:51 -0500 Subject: [PATCH 3/3] spotless --- .../java/org/apache/maven/plugin/compiler/PathSelector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e2fcc5a15..40f80ff28 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java +++ b/src/main/java/org/apache/maven/plugin/compiler/PathSelector.java @@ -212,7 +212,7 @@ private static Collection effectiveExcludes(Collection excludes, } prefixes = sortByLength(prefixes, false); suffixes = sortByLength(suffixes, true); - + /* * Keep only the excludes which start with one of the prefixes and end with one of the suffixes. * Note that a prefix or suffix may be the empty string, which matches everything.