TrivialFunctionalExpressionUsageInspection: disable for multi-statement lambda in "for" init/update

This commit is contained in:
Tagir Valeev
2017-05-29 12:19:05 +07:00
parent 7bb6ff8ff4
commit b209ade15d
5 changed files with 36 additions and 7 deletions
@@ -0,0 +1,13 @@
// "Replace method call on lambda with lambda body" "false"
public class Main {
public static void main(String[] args) {
int i = 0;
for (((Runnable) (() -> {
System.out.println("Hello");
System.out.println("World");
})).r<caret>un(); i < 10; ) {
System.out.println(i++);
}
}
}
@@ -0,0 +1,13 @@
// "Replace method call on lambda with lambda body" "false"
public class Main {
public static void main(String[] args) {
for (int i = 0; i < 10; ((Runnable) (() -> {
System.out.println("Hello");
System.out.println("World");
return;
})).ru<caret>n()) {
System.out.println(i++);
}
}
}