Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/fuseStreamOperations/afterToCollectionGeneric.java
Tagir Valeev 1779a8a871 FuseStreamOperationsInspection: fixes according to review IDEA-CR-24873
1. Code sample in description
2. Supported toCollection with parameterized method-reference
2017-09-27 10:50:03 +07:00

13 lines
343 B
Java

// "Fuse ArrayList into the Stream API chain" "true"
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Test {
void test(Stream<String> stream) {
List<Object> objects = stream.distinct().collect(Collectors.toList());
}
}