Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/fuseStreamOperations/beforeHashSetToSet.java
Tagir Valeev 2572c79c56 CollectMigration.NewListTerminal: support Guava collection constructors (IDEA-219934)
Also remove .distinct() automatically when unnecessary.

GitOrigin-RevId: 504dd9e645f9492a4142c0793c42188912afdde9
2019-08-07 12:04:38 +03:00

9 lines
220 B
Java

// "Fuse HashSet into the Stream API chain" "true"
import java.util.*;
import java.util.stream.*;
class X {
void foo(Stream<String> s) {
Set<String> set = new HashSet<>(s.co<caret>llect(Collectors.toSet()));
}
}