mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-179280 java9 - intention to use Map.ofEntries
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// "Replace with 'Map.ofEntries' call" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Test {
|
||||
static final Map<String, String> map;
|
||||
|
||||
static {
|
||||
//_map.put("a", "b");
|
||||
map = Map.ofEntries(Map.entry("c", "d"), Map.entry("e", "f"), Map.entry("g", "h"), Map.entry("i", "j"), Map.entry("k", "l"),
|
||||
// and m
|
||||
Map.entry("m", "n"), Map.entry("o", "p"), Map.entry("r", "s"), Map.entry("t", /*uuuu*/"u"), Map.entry("v", "w"), Map.entry("x", /*you*/ "y"),
|
||||
// q was forgotten!
|
||||
Map.entry("q", "z"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user