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 22:15:54 UTC 2025
On Fri, 28 Feb 2025 22:09:55 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> The two dangling warnings would be reported before the start of the method body -- but if we just flush things when we get to the closest `endDecl`, we'd report them as part of the method parameter declarations. Is that what you mean?
Still, I'm confused because if I do this with the code in this PR:
class Test {
/** one */
void test(@SuppressWarnings("dangling-doc-comments") /** two */ int i, /** three */ int y) { }
}
One of the two warnings actually gets suppressed -- suggesting that the warning -- after all - is being attributed to the method parameter (which seems odd, given that method parameters cannot have javadoc comments).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23237#issuecomment-2691634913
More information about the compiler-dev
mailing list