diff --git a/java/java-tests/testData/inspection/streamApiCallChains/beforeCollectorReducing2.java b/java/java-tests/testData/inspection/streamApiCallChains/beforeCollectorReducing2.java new file mode 100644 index 000000000000..0f0da24629f6 --- /dev/null +++ b/java/java-tests/testData/inspection/streamApiCallChains/beforeCollectorReducing2.java @@ -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 data) { + return data.stream().filter(x -> x.startsWith("xyz")).collect(Collectors.reducing("", String::concat)); + } +} \ No newline at end of file