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..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,10 +492,10 @@ 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 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..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,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(':');