checker-framework
checker-framework copied to clipboard
Warn about code that triggers Javac bug: type annotations on anonymous classes cause broken bytecode
A javac bug generates broken bytecode for anonymous inner classes that are annotated with a type annotation.
See: https://bugs.openjdk.java.net/browse/JDK-8059531 https://bugs.openjdk.java.net/browse/JDK-8177316
The Checker Framework should issue a warning if a user writes such a bug.
(@lazaroclapp and @msridhar brought this to our attention on PR #1918.)
@msridhar @lazaroclapp This feature request is to issue a warning if the user writes code that triggers the bug.
It looks like Oracle doesn't have a bug fix at all yet. Once they do, or if you create one, you could backport it into the Error Prone compiler (which I think you use, and which we may start using soon).