mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 21:52:48 +07:00
1. Methods on PsiModifierList and PsiModifierListOwner should produce consistent result 2. getAnnotations() should be consistent with hasAnnotation() and findAnnotation/getAnnotation() 3. Compact constructor parameters should also have annotations 4. It's wrong to mix annotations on field type/method return type and annotations on field/method itself. Problems especially arise when component type is an array: in this case, it has separate set of annotations (declared before []). Also, it's unnecessary to filter annotations on type: they are already filtered; only type_use annotations are there. Fixes IDEA-302340 'Constant values' false positive for record @Nullable array when DefaultQualifier NonNull is used in package-info GitOrigin-RevId: 39f7bcd8fca652fb50c92c52b95a5d39b4400fc8
12 lines
339 B
Java
12 lines
339 B
Java
import org.checkerframework.checker.nullness.qual.*;
|
|
import org.checkerframework.framework.qual.*;
|
|
|
|
@DefaultQualifier(NonNull.class)
|
|
record SimpleRecord(String @Nullable [] nullableArray) {
|
|
public static void main() {
|
|
SimpleRecord record = new SimpleRecord(null);
|
|
if (record.nullableArray() == null) {
|
|
// etc...
|
|
}
|
|
}
|
|
} |