RFR: 8224228: No way to locally suppress lint warnings in parser/tokenizer or preview features

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Jan 23 18:19:46 UTC 2025


On Wed, 22 Jan 2025 16:15:40 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.

Question: the change looks beneficial, but there's a lot going on in the PR. Would it be possible, do you think, to break it down into simpler parts? For instance, the push/pop logic seems something that we could review and integrate separately (and it's adding quite a bit of noise to the PR). Same for missing flushes etc.

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

PR Comment: https://git.openjdk.org/jdk/pull/23237#issuecomment-2610626795


More information about the compiler-dev mailing list