mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +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
14 lines
343 B
Java
14 lines
343 B
Java
// "Replace 'addAll()' call with parametrized constructor call" "true"
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
|
|
public class Test {
|
|
void test(Object c) {
|
|
List<String> list, other;
|
|
//noinspection unchecked
|
|
list = new ArrayList<>((Collection<String>) c);
|
|
System.out.println(list);
|
|
}
|
|
}
|