mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-160442 Warn about excessive use of collectors (additional test file)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.collect(reducing()) with Stream.reduce()" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Main {
|
||||
public String concat(List<String> data) {
|
||||
return data.stream().filter(x -> x.startsWith("xyz")).colle<caret>ct(Collectors.reducing("", String::concat));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user