gnodet-bot commented on code in PR #13955:
URL: https://github.com/apache/maven/pull/13955#discussion_r4554239647


##########
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java:
##########
@@ -357,24 +380,16 @@ protected final void createTerminal(C context) {
     }
 
     /**
-     * Override this method to create Terminal as you want.
+     * Override this method to customize terminal creation for non-embedded 
(system-terminal) mode.
+     * The builder is pre-configured with {@code name("Maven")} and {@code 
dumb(true)}.
+     * Custom streams must not be added here — use the embedded path in
+     * {@link #createTerminal(LookupContext)} instead.
      *
      * @see #createTerminal(LookupContext)
      */
     protected void doCreateTerminal(C context, TerminalBuilder builder) {

Review Comment:
   💡 **Nit:** `doCreateTerminal()` is now never called — neither the embedded 
path nor the system-terminal path invokes it. The method is a no-op in the base 
and can't be meaningfully overridden. The Javadoc "Override this method to 
customize terminal creation for non-embedded (system-terminal) mode" is 
misleading since the system path calls `MessageUtils.systemInstall(null, ...)` 
directly.
   
   Either call `doCreateTerminal()` from the system path (passing the builder), 
or add a `@Deprecated` notice noting that the override point is dead. External 
embedders that override this method will be silently broken.



##########
compat/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliLoggingTest.java:
##########
@@ -273,19 +263,19 @@ void logFileBranchAwaitsTerminalBeforeRedirect(@TempDir 
Path tempDir) throws Exc
         }
     }
 
+    @Test

Review Comment:
   💡 **Nit:** `@Test` is placed *before* the Javadoc block, which is wrong. 
Java convention requires annotations to appear **after** the Javadoc comment, 
immediately before the method declaration. Move `@Test` to the line just before 
`void cachesOutputAfterTerminalInstallationWithColorDisabled()`.



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