annotate method if asked even it's (implicitly) inferred as NotNull

This commit is contained in:
Alexey Kudravtsev
2017-06-29 15:50:42 +03:00
parent 258afb3833
commit 8037bdbfd1
5 changed files with 86 additions and 25 deletions

View File

@@ -0,0 +1,18 @@
// "Annotate overridden methods as '@NotNull'" "true"
import org.jetbrains.annotations.NotNull;
abstract class P2 {
@NotNull<caret>
String foo(@NotNull String p) {
return p;
}
Object o = new P2() {
@NotNull
@Override
String foo(String p) {
return "";
}
};
}

View File

@@ -0,0 +1,17 @@
// "Annotate overridden methods as '@NotNull'" "true"
import org.jetbrains.annotations.NotNull;
abstract class P2 {
@NotNull<caret>
String foo(@NotNull String p) {
return p;
}
Object o = new P2() {
@Override
String foo(String p) {
return "";
}
};
}