surround with if: fix for expression lambda (IDEA-160218)

This commit is contained in:
Anna Kozlova
2016-08-24 15:14:38 +03:00
parent 7fee43ed06
commit 08a18bc8bd
3 changed files with 29 additions and 3 deletions
@@ -0,0 +1,12 @@
// "Surround with 'if (i != null)'" "true"
import org.jetbrains.annotations.Nullable;
class A {
void foo(@Nullable String i) {
Runnable r = () -> {
if (i != null) {
i.length();
}
};
}
}
@@ -0,0 +1,8 @@
// "Surround with 'if (i != null)'" "true"
import org.jetbrains.annotations.Nullable;
class A {
void foo(@Nullable String i) {
Runnable r = () -> i.<caret>length();
}
}