mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-12 10:06:52 +07:00
[java-inspections] Java9CollectionFactoryInspection: copyOf: respect declared nullity of source collection
Fixes IDEA-349386 Don't suggest List/Set/Map.copyOf when elements are annotated @Nullable GitOrigin-RevId: f2c1298394f204732437d304f68272f6cf406cc0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8e179a0a46
commit
cd2be32f62
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'Map.copyOf()' call" "false"
|
||||
import org.jetbrains.annotations.*;
|
||||
import java.util.*;
|
||||
|
||||
class Scratch {
|
||||
public static void main(HashMap<@Nullable String, String> data) {
|
||||
var map = Collections.<caret>unmodifiableMap(new HashMap<>(data));
|
||||
System.out.println(map);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user