This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch lam
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git


The following commit(s) were added to refs/heads/lam by this push:
     new b94b4a5  revert
b94b4a5 is described below

commit b94b4a5a575eb48c46e17bcce7f8d94dee632406
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Sat Jan 31 07:01:18 2026 -0600

    revert
---
 .../java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 07fcbae..c00d35a 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1602,7 +1602,10 @@ public abstract class AbstractCompilerMojo implements 
Mojo {
             }
         }
         if (ProjectScope.MAIN.equals(compileScope.projectScope())) {
-            
dependencies.warningForFilenameBasedAutomodules().ifPresent(warning -> 
logger.warn(warning));
+            String warning = 
dependencies.warningForFilenameBasedAutomodules().orElse(null);
+            if (warning != null) { // Do not use Optional.ifPresent(…) for 
avoiding confusing source class name.
+                logger.warn(warning);
+            }
         }
         return dependencies;
     }

Reply via email to