mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
'collection.addAll(Set.of("x"))'
'collection.addAll(Collections.singletonList("x"))'
GitOrigin-RevId: 4a9185f774f9368fdcb5377eaeddb108b521f174
11 lines
303 B
Java
11 lines
303 B
Java
// "Fix all 'Redundant 'Collection' operation' problems in file" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
void test(List<Integer> list) {
|
|
list.add<caret>All(Collections.singleton(42));
|
|
list.addAll(Collections.singletonList(42));
|
|
list.addAll(List.of(42));
|
|
list.addAll(Set.of(42));
|
|
}
|
|
} |