mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-140331 Improve intention action for 'Method invocation may produce NPE'
This commit is contained in:
+11
@@ -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") {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -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") {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user