mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 04:45:04 +07:00
IDEA-178761 Inspection 'Collection.addAll() can be replaced with parametrized constructor' should be turned on by default Fixes comments handling, possible semantics change; now suggested in more cases
17 lines
403 B
Java
17 lines
403 B
Java
// "Replace 'addAll()' call with parametrized constructor call" "true"
|
|
import java.lang.String;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
class C {
|
|
void m() {
|
|
Set<String> s = new HashSet<String>();
|
|
s.add(100);
|
|
s.add(101);
|
|
s.add(102);
|
|
final List<String> strings = new ArrayList<String>();
|
|
strings.<caret>addAll(s);
|
|
}
|
|
} |