RFR: JDK-8310061: Note if implicit annotation processing is being used [v4]

Joe Darcy darcy at openjdk.org
Wed Jun 28 19:39:58 UTC 2023


On Wed, 28 Jun 2023 17:20:01 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> 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.

PS Will add a clarifying comment that the idiom in question is intentional.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14499#discussion_r1245677485


More information about the compiler-dev mailing list