mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 04:07:30 +07:00
IDEA-355699 Warning when annotating array elements as nullable with JSpecify GitOrigin-RevId: ca9a3e0ea2ef3aa01d31afcaff2f92193af14dbe
16 lines
720 B
Java
16 lines
720 B
Java
import org.jspecify.annotations.Nullable;
|
|
|
|
import java.util.List;
|
|
|
|
class Demo {
|
|
public void demo() {
|
|
<warning descr="Nullability annotation is not applicable to local variables">@Nullable</warning> String str;
|
|
|
|
<warning descr="Nullability annotation is not applicable to local variables">@Nullable</warning> List<@Nullable String> list;
|
|
|
|
@Nullable Boolean[] array1 = new Boolean[]{true, false, null};
|
|
Boolean <warning descr="Nullability annotation is not applicable to local variables">@Nullable</warning> [] array2 = null;
|
|
Boolean <warning descr="Nullability annotation is not applicable to local variables">@Nullable</warning> [] [] array3 = null;
|
|
Boolean [] @Nullable [] array4 = null;
|
|
}
|
|
} |