mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Intention that wraps list/set/map with Collections.unmodifiableList/Set/Map (IDEA-93154)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Wrap with unmodifiable map" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
class C {
|
||||
Map<String, Integer> test() {
|
||||
var result = new HashMap<>();
|
||||
return Collections.unmodifiableMap(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user