mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 21:52:48 +07:00
While annotation implementations created by reflection never return nulls, it's possible to create a custom annotation interface implementation and nothing stops from returning null in this case. This leads to false-positives. Fixes IDEA-269686 Wrong inspection message for nullable return value of annotation Rollback IDEA-151174 Annotation method return values are non-nullable GitOrigin-RevId: 88301bd8f5fb69e1e78efc23ecc1416c7c441473
12 lines
175 B
Java
12 lines
175 B
Java
class Test {
|
|
@interface FooBar {
|
|
String x();
|
|
}
|
|
|
|
static void baz(FooBar annotation) {
|
|
if (annotation.x() == null) {
|
|
System.out.println("null");
|
|
}
|
|
}
|
|
}
|