mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 11:00:04 +07:00
StreamApiMigration: add parentheses if necessary when .stream() can be omitted (fix for EA-93812).
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace with forEach" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Test {
|
||||
void test(Object obj) {
|
||||
((Collection<String>) obj).forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with forEach" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Test {
|
||||
void test(Object obj) {
|
||||
for(String str : (Collection<String>)<caret>obj) {
|
||||
System.out.println(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user