wilx commented on code in PR #1076:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1076#discussion_r3616551318
##########
src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java:
##########
@@ -774,11 +774,14 @@ List<SourceFile> getModifiedSources() {
/**
* {@return whether the given list of modified files should not cause a
recompilation}
* This method returns {@code true} if the given list is empty or contains
only files
- * with the {@link SourceFile#ignoreModification} set to {@code true}.
+ * with the {@link SourceFile#ignoreModification} set to {@code true}, or
empty source
+ * files for which no output file exists.
*
* @param sourceFiles return value of {@link #getModifiedSources()}.
*/
static boolean isEmptyOrIgnorable(List<SourceFile> sourceFiles) {
- return sourceFiles.stream().allMatch((s) -> s.ignoreModification);
+ return sourceFiles.stream()
+ .allMatch(
+ (s) -> s.ignoreModification || (s.isEmpty &&
Files.notExists(s.getOutputFile(), LINK_OPTIONS)));
Review Comment:
Moved.
##########
src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.java:
##########
@@ -774,11 +774,14 @@ List<SourceFile> getModifiedSources() {
/**
* {@return whether the given list of modified files should not cause a
recompilation}
* This method returns {@code true} if the given list is empty or contains
only files
- * with the {@link SourceFile#ignoreModification} set to {@code true}.
+ * with the {@link SourceFile#ignoreModification} set to {@code true}, or
empty source
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]