cstamas commented on code in PR #2311: URL: https://github.com/apache/maven/pull/2311#discussion_r2084759497
########## impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java: ########## @@ -122,27 +122,29 @@ private ExecutorRequest.Builder mojo(ExecutorRequest.Builder builder, String moj return builder.argument(TOOLBOX + mojo).argument("--quiet").argument("-DforceStdout"); } - private void doExecute(ExecutorRequest.Builder builder) { + private ExecutorRequest doExecute(ExecutorRequest.Builder builder) { ExecutorRequest request = builder.build(); int ec = helper.execute(request); if (ec != 0) { throw new ExecutorException("Unexpected exit code=" + ec + "; stdout=" + request.stdOut().orElse(null) + "; stderr=" + request.stdErr().orElse(null)); } + return request; } /** * Performs "sanity check" for output, making sure no insane values like empty strings are returned. */ - private String validateOutput(boolean shave, ByteArrayOutputStream stdout, ByteArrayOutputStream stderr) { + private String validateOutput( + ExecutorRequest request, boolean shave, ByteArrayOutputStream stdout, ByteArrayOutputStream stderr) { Review Comment: Nowhere, you are right. The original problem was that on "unexpected stderr output" this method was throwing, but on Java 24 that "unexpected output" is present. Change can be simplified by dropping this method. (originally I wanted to send content to caller, just realize that this class is setting the streams, not caller, caller is really interested in success (exit code = 0) and stdout). -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org