RFR: 8224228: No way to locally suppress lint warnings in parser/tokenizer or preview features [v13]
Jan Lahoda
jlahoda at openjdk.org
Wed Feb 26 13:25:03 UTC 2025
On Fri, 21 Feb 2025 21:29:09 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> This PR updates the `DeferredLintHandler` so that deferred warnings can be registered during parsing, before any `JCTree` nodes have been created, and it uses this new capability to update the `"preview"` and `"text-blocks"` Lint warnings so that they can be suppressed via `@SuppressWarnings` annotations. More details are provided in additional comments.
>>
>> Note: This PR depends on (i.e., includes and extends) these other "cleanup" PR's:
>> * #23167
>> * #23281
>> * #23400
>> * #23669
>> * #23730
>
> Archie Cobbs has updated the pull request incrementally with two additional commits since the last revision:
>
> - Merge branch 'JDK-8350514' (split out as sub-task) into JDK-8224228.
> - Refactor MandatoryWarningHandler to support dynamic verbosity.
I think I would prefer not to augment the trees with end positions until/unless we need them.
Regarding the new lint warnings - we probably should be careful with introducing new lints until we have some time to think about both conceptual and implementation directions for lints inside javac. (Although I admit I may have to introduce a new lint sometime soon.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23237#issuecomment-2684946293
More information about the compiler-dev
mailing list