mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
IDEA-121658 Java 1.8: "Replace with forEach" quick fix is not suggested if for statement is not surrounded with braces
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with forEach" "true"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class Sample {
|
||||
List<String> foo = new ArrayList<>();
|
||||
{
|
||||
foo.forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with forEach" "true"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class Sample {
|
||||
List<String> foo = new ArrayList<>();
|
||||
{
|
||||
for (String s : fo<caret>o) System.out.println(s);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user