Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/useBulkOperation/afterMapForEachMethodReference.java
Andrey.Cherkasov f68f593aa4 [java-inspections] UseBulkOperationInspection: support Maps (IDEA-262786)
GitOrigin-RevId: 9aae98c287f6e2057b09bfda78fb007ba45eeee6
2021-05-28 23:55:59 +00:00

11 lines
245 B
Java

// "Replace iteration with bulk 'Map.putAll' call" "true"
import java.util.*;
class Main {
void test(Map<String, Integer> map) {
Map<String, Integer> result = new HashMap<>();
result.put("answer", 42);
result.putAll(map);
}
}