mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-12 21:37:00 +07:00
Fixes IDEA-349386 Don't suggest List/Set/Map.copyOf when elements are annotated @Nullable GitOrigin-RevId: f2c1298394f204732437d304f68272f6cf406cc0
16 lines
387 B
Java
16 lines
387 B
Java
// "Replace with 'List.copyOf()' call" "false"
|
|
import org.jetbrains.annotations.*;
|
|
import java.util.*;
|
|
|
|
class Scratch {
|
|
public static void main(String[] args) {
|
|
var data = new ArrayList<@Nullable String>();
|
|
data.add("foo");
|
|
data.add("bar");
|
|
data.add(null);
|
|
|
|
var list = Collections.<caret>unmodifiableList(new ArrayList<>(data));
|
|
|
|
System.out.println(list);
|
|
}
|
|
} |