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

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Feb 28 18:44:54 UTC 2025


On Fri, 28 Feb 2025 18:28:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Some interesting (and extreme) cases:

The first actually works correctly with the changes in this PR (presumably because the start of the method decl includes the annotation). The second is just a buggy test I think -- if there's a space after the lint  category, I don't think javac can recognize it.

I believe the simpler approach I proposed earlier will probably struggle to deal with the first example -- because annotations are parsed very early in a declaration (sometimes when we still don't know what we're parsing).

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

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


More information about the compiler-dev mailing list