RFR: 8348611: Eliminate DeferredLintHandler and emit warnings after attribution [v11]
Stephan Schroevers
duke at openjdk.org
Sun Sep 21 14:33:34 UTC 2025
On Sun, 21 Sep 2025 13:51:05 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> This PR fixes an issue that impacts JDK 25. See openrewrite/rewrite-templating#165 for details. Can/will it be backported for inclusion in JDK 25.0.1?
>>
>> (Asking here, as I don't have an account at https://bugs.openjdk.org/. Let me know if there's a better/preferred channel.)
>
> @Stephan202,
>
> I took at look at the openrewrite issue but it's not specific on what the actual bug is. Also, this PR was mostly a refactoring so that doesn't clarify it either. Do you have a small reproducer test case that demonstrates the bug?
Hey @archiecobbs! I used the reproducer in openrewrite/rewrite-templating#165 to `git bisect` my way to the commits that introduced and then resolved the issue (by building the JDK at a specific revision, then manually checking whether the build failed with `export JAVA_HOME=/tmp/jdk/build/linux-x86_64-server-release/jdk`).
The actual bug is described [here](https://github.com/PicnicSupermarket/error-prone-support/pull/1853#pullrequestreview-3241202198): "somehow" when OpenRewrite's annotation processor is active, `javac` reports `unchecked` and `deprecation` warnings, despite occurring in a `@SuppressWarnings` scope. I only briefly looked around with a debugger, but was not familiar enough with JDK internals to quickly understand what happens.
I'm currently working on a much smaller reproduction case; I'll post here once done.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24584#issuecomment-3316031893
More information about the compiler-dev
mailing list