IDEA-140331 Improve intention action for 'Method invocation may produce NPE'

This commit is contained in:
peter
2015-05-18 17:02:51 +02:00
parent d6d5f50345
commit 069adff3dd
4 changed files with 31 additions and 1 deletions
@@ -0,0 +1,11 @@
// "Surround with 'if (i != null)'" "true"
import org.jetbrains.annotations.Nullable;
class A {
void foo(@Nullable String i) {
if (i != null && i.length() > 0) {
if (i != "a") {
}
}
}
}
@@ -0,0 +1,11 @@
// "Surround with 'if (i != null)'" "true"
import org.jetbrains.annotations.Nullable;
class A {
void foo(@Nullable String i) {
if (i.le<caret>ngth() > 0) {
if (i != "a") {
}
}
}
}