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


##########
src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java:
##########
@@ -222,12 +218,8 @@ public class ToolExecutor {
     protected ToolExecutor(final AbstractCompilerMojo mojo, 
DiagnosticListener<? super JavaFileObject> listener)
             throws IOException {
 
+        this.listener = requireNonNull(listener, "DiagnosticListener can't be 
null in ToolExecutor");

Review Comment:
   yes but I think it is cleaner to ensure we have a listener and avoid to rely 
on mojo there
   the issue having the default there is that it makes the code particular to a 
single use case
   I hesitate to drop tool executor to bring it back in the abstract mojo to 
keep the coupling
   
   long story short, I think it doesn't change much thing even if we should 
probably clean up the tool executor coupling and keep it more generic (as 
plexus was before)



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