mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-160637 test fixed
This commit is contained in:
+1
-2
@@ -7,7 +7,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class Main {
|
||||
public void test(List<Set<String>> nested) {
|
||||
List<String> result = nested.stream().filter(element -> element != null).flatMap(Collection::stream)
|
||||
.filter(str -> str.startsWith("xyz")).map(String::trim).collect(Collectors.toList());
|
||||
List<String> result = nested.stream().filter(element -> element != null).flatMap(Collection::stream).filter(str -> str.startsWith("xyz")).map(String::trim).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -6,10 +6,10 @@ import java.util.Map;
|
||||
public class Main {
|
||||
public void test(Map<String, String[]> map) {
|
||||
List<String> result = new ArrayList<>();
|
||||
map.entrySet().stream().filter(entry -> entry.getKey().startsWith("x")).map(Map.Entry::getValue).forEach(arr -> {
|
||||
for (String str : arr) {
|
||||
result.add(str.trim() + arr.length);
|
||||
}
|
||||
});
|
||||
map.entrySet().stream().filter(entry -> entry.getKey().startsWith("x")).map(Map.Entry::getValue).forEach(arr -> {
|
||||
for (String str : arr) {
|
||||
result.add(str.trim() + arr.length);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user