For the following example, I get several warnings "Uncallable method ... defined in anonymous class".
class FalsePositive {
static void method() {
record MyRecord(int from, int to) { /**/ }
enum MyEnum {
RED, BLUE;
}
System.out.println(new MyRecord(1, 2));
System.out.println(MyEnum.RED);
}
}
The example has no anonymous class (all classes have a name) and all uncallable methods pinpointed are callable (which doesn't mean I need to call them - they were generated by the compiler)
- MyEnum.valueOf(String)
- MyEnum.values()
- MyRecord.from()
- MyRecord.to()
For the following example, I get several warnings "Uncallable method ... defined in anonymous class".
The example has no anonymous class (all classes have a name) and all uncallable methods pinpointed are callable (which doesn't mean I need to call them - they were generated by the compiler)