Copilot commented on code in PR #1077:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1077#discussion_r3665352160
##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -858,7 +858,11 @@ private void executeReal() throws MojoExecutionException,
CompilationFailureExce
compilerConfiguration.setSourceLocations(compileSourceRoots);
- compilerConfiguration.setAnnotationProcessors(annotationProcessors);
+ String[] processors = annotationProcessors;
+ if (processors != null &&
Arrays.stream(processors).allMatch(StringUtils::isBlank)) {
+ processors = null;
+ }
+ compilerConfiguration.setAnnotationProcessors(processors);
Review Comment:
This only handles the case where *all* entries are blank. If Maven ever
produces a mixed array (e.g., `{\"\", \"com.example.Processor\"}`), the blank
entries will still be forwarded and can still produce an invalid `-processor`
argument with an empty token. Consider filtering out blank entries
unconditionally, then setting the result to null if nothing remains, so mixed
whitespace doesn’t break compilation.
--
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]