Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectLinkedHashSet.java

19 lines
361 B
Java

// "Replace with collect" "true"
import java.util.*;
import java.util.stream.Collectors;
public class Collect {
class Person {
String getName() {
return "";
}
}
void collectNames(List<Person> persons){
Set<String> names = new LinkedHashSet<>();
for (Person person : pers<caret>ons) {
names.add(person.getName());
}
}
}