desruisseaux commented on code in PR #1027:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/1027#discussion_r2753827880


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -1248,6 +1258,18 @@ public ToolExecutor createExecutor(DiagnosticListener<? 
super JavaFileObject> li
         return executor;
     }
 
+    /**
+     * Simple utility to enforce a listener.
+     * @param listener caller provided listener.
+     * @return user listener if not null else maven internal one.
+     */
+    private DiagnosticListener<? super JavaFileObject> useOrCreateListener(
+            final DiagnosticListener<? super JavaFileObject> listener) {
+        return listener == null

Review Comment:
   I prefer that we keep this construction inside `ToolExecutor` as today, in 
order to have a single place where the default listener is constructed. It 
would avoid my confusion in 
[this](https://github.com/apache/maven-compiler-plugin/pull/1027/changes#r2753790894)
 and 
[this](https://github.com/apache/maven-compiler-plugin/pull/1027/changes#r2753796792)
 comment.



-- 
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]

Reply via email to