Manas-Dikshit commented on PR #1017: URL: https://github.com/apache/maven-compiler-plugin/pull/1017#issuecomment-3865201065
You are right, @desruisseaux. The current structure of the if (“only”.equalsIgnoreCase(compilerConfiguration.getProc())) block appears redundant, but it still executes compile(compiler, configuration) just like the next line. This conditional block was originally introduced for debugging purposes to help me determine why the build failed, specifically that the annotation processors did not run after only was set. Earlier versions of the implementations would not have hit the compilation phase of processing due to the process finishing before seeing any Java sources being processed by the compiler; hence, this conditional block has allowed me to isolate that portion of the flow to confirm that the compiler was called in proc:only mode. The next step is to ensure that this condition processes correctly. The compiler will execute all annotation processors, in case there are no “stale” Java source files whenever the configuration is set to <proc>only</proc>. The final version will ensure that compile() is executed on purpose; this method is currently being executed by chance because it is occurring as a part of the normal flow. In summary, you are right that the current version does not change the behaviour of the processor at all, since the initial diagnosis has been completed. The next version will clean up this method so that it will not only differentiate between normal compilation vs processor only execution. -- 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]
