Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantCollectionOperation/afterPutAllCollectionsSingletonMap.java
Andrey.Cherkasov 2a4585c9ce [java-inspections] RedundantCollectionOperation: add new simplifications:
'map.putAll(Collections.singletonMap(k, v))' -> 'map.put(k, v)'
'collection.addAll(Collections.singleton(e))' -> 'collection.add(e)'

(IJ-CR-13981)

GitOrigin-RevId: f4f4b6b1c190f89a2430309fc2658f321a518e6d
2021-09-13 19:01:10 +00:00

8 lines
135 B
Java

// "Replace with 'put()'" "true"
import java.util.*;
class Test {
void test(Map<Integer, String> map) {
map.put(1, "one");
}
}