mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
support min/max in stream api migration, rearrange tests
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);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with forEach" "true"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class Sample {
|
||||
List<Exception> foo = new ArrayList<>();
|
||||
{
|
||||
foo.forEach(Throwable::printStackTrace);
|
||||
}
|
||||
}
|
||||
+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace with forEach" "true"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class Sample {
|
||||
List<Exception> foo = new ArrayList<>();
|
||||
{
|
||||
for (Exception e : fo<caret>o) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user