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

14 lines
321 B
Java

// "Replace with collect" "true"
import java.util.*;
public class Main {
private Map<Integer, List<String>> test(String... list) {
Map<Integer, List<String>> map = new HashMap<>();
for(String s : l<caret>ist) {
map.computeIfAbsent(s.length(), k -> new ArrayList<>()).add(s);
}
return map;
}
}