mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 13:48:49 +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
380 B
Java
14 lines
380 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 = new ArrayList<>();
|
|
//noinspection unchecked
|
|
list./*inside*/ad<caret>dAll((/*cast!*/Collection<String>) c); // after
|
|
System.out.println(list);
|
|
}
|
|
}
|