Parameter annotations reported incorrectly for local class constructor
class NotNullBug {
public void foo(String foo, final Object bar) {
class Test {
private Test(@NotNull String test) {
System.out.println(bar);
}
}
new Test(foo);
}
}
Test constructor has 3 parameters in bytecode: NotNullBug outer, String test,
Object bar. The first and the third one are synthetic.
But ClassReader#readParameterAnnotations assumes that all synthetic parameters go
first, and so reports that @NotNull is on the third parameter (Object bar) which
is incorrect.