mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-120586 @ParametersAreNonnullByDefault support broken
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
package foo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class C {
|
||||
@Nullable
|
||||
private String a;
|
||||
private String b;
|
||||
|
||||
public void setA(String <warning descr="Setter parameter for @Nullable field is annotated @ParametersAreNonnullByDefault">a</warning>) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public void setB(@Nullable String b) { // doesn't lead to a warning because b field is not a parameter
|
||||
this.b = b;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -6,7 +6,7 @@ class B {
|
||||
public void fun(Object o) {}
|
||||
};
|
||||
new AnyFunction() {
|
||||
public void fun(Object <warning descr="Not annotated parameter overrides @NotNull parameter">o</warning>) {}
|
||||
public void fun(Object <warning descr="Not annotated parameter overrides @ParametersAreNonnullByDefault parameter">o</warning>) {}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package foo;
|
||||
|
||||
interface A {
|
||||
void f(double a);
|
||||
void f2(Object a);
|
||||
}
|
||||
|
||||
class B implements A {
|
||||
public void f(double a) {
|
||||
}
|
||||
public void f2(Object a) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user