checker-framework icon indicating copy to clipboard operation
checker-framework copied to clipboard

Warn about code that triggers Javac bug: type annotations on anonymous classes cause broken bytecode

Open smillst opened this issue 7 years ago • 1 comments

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.)

smillst avatar Apr 02 '18 15:04 smillst

@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).

mernst avatar Apr 04 '18 19:04 mernst