IDEA-133129 Expression is incorrectly detected as being nullable

This commit is contained in:
peter
2014-11-20 15:54:02 +01:00
parent 110abf16a4
commit 10d04aeab3
3 changed files with 16 additions and 1 deletions
@@ -0,0 +1,14 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
final class Alive {
@Nullable private transient Object elvis;
@NotNull
public Object smth() {
if (elvis != null) {
return elvis;
} else {
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
}
}
}