mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 08:45:34 +07:00
IDEA-178922 A few more null annotation problems with arrays
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import typeUse.*;
|
||||
|
||||
class Test {
|
||||
private byte <warning descr="Not-null fields must be initialized">@NotNull</warning> [] field;
|
||||
private byte @NotNull [] initField;
|
||||
|
||||
{
|
||||
initField = new byte[0];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import typeUse.*;
|
||||
|
||||
class Super {
|
||||
void m1(byte @NotNull [] p) {}
|
||||
void m2(byte @NotNull [] p) {}
|
||||
void m3(byte[] p) {}
|
||||
}
|
||||
|
||||
class Sub extends Super {
|
||||
void m1(byte @NotNull [] p) {}
|
||||
void m2(byte[] <warning descr="Not annotated parameter overrides @NotNull parameter">p</warning>) {}
|
||||
void m3(byte <warning descr="Parameter annotated @NotNull should not override non-annotated parameter">@NotNull</warning> [] p) {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user