Commit Graph

2 Commits

Author SHA1 Message Date
Andrey.Cherkasov
cc1c1cc844 [java-inspections] RedundantCollectionOperation: warn 'collection.addAll(List.of("x"))'
'collection.addAll(Set.of("x"))'
'collection.addAll(Collections.singletonList("x"))'

GitOrigin-RevId: 4a9185f774f9368fdcb5377eaeddb108b521f174
2022-01-04 21:57:31 +00:00
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