[jdk8u-dev] RFR: 8151255: javac with a annotation processor returns incorrect error code
yangsummer
duke at openjdk.org
Fri Jan 26 03:57:43 UTC 2024
Hi,
When I was building my application using Maven 3.6.3, I had two applications A and B that had a dependency relationship. B relied on A's jar. When I built both A and B simultaneously, A built successfully. Although B threw an exception, Javac believed that B had built successfully. I unpacked B's jar package and found that there was no class file inside. So I searched for the reason based on the exception information, and found that Javac was divided into multiple rounds when processing annotations. If an abort occurred in a certain round, Javac would not be able to find the delegate compiler. If Javac's own errors were 0 at this time, it would consider compilation successful, but te specific error information was reported to the global diagnosticCollector by the delegate compiler, So even though Maven printed an error, it didn't stop working due to the error, but instead continued to package and ultimately printed an incorrect package.
-------------
Commit messages:
- 8151255: javac with a annotation processor returns incorrect error code
Changes: https://git.openjdk.org/jdk8u-dev/pull/432/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=432&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8151255
Stats: 18 lines in 1 file changed: 18 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/432.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/432/head:pull/432
PR: https://git.openjdk.org/jdk8u-dev/pull/432
More information about the jdk8u-dev
mailing list