RFR: JDK-8310061: Note if implicit annotation processing is being used [v4]
Joe Darcy
darcy at openjdk.org
Wed Jun 28 17:27:04 UTC 2023
On Wed, 28 Jun 2023 17:12:58 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Expand cases where an annotation processor path is detected.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java line 437:
>
>> 435: optionsCheckingInitiallyDisabled =
>> 436: options.isSet(Option.XLINT_CUSTOM, "-options") ||
>> 437: options.isSet(Option.XLINT_CUSTOM, "none");
>
> You have a `context`, so you can use get a `Lint` object with `Lint.instance(context)` and then use `isEnabled(LintCategory)`
I'm slightly abusing the existing lint options category here. I want to have the effect that a new options-related link check is on by default. There are lint categories that are enabled by default, but options isn't one of them.
I'm implementing that policy by treating the implicit annotation processing check as enabled unless options checking has been explicitly disabled, which is what the code above does and is different than the standard is-options-lint-category enabled check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14499#discussion_r1245538677
More information about the compiler-dev
mailing list