--- a/src/java.base/share/classes/java/util/Map.java Thu Mar 22 09:07:08 2018 -0700
+++ b/src/java.base/share/classes/java/util/Map.java Sat Dec 09 03:33:39 2017 +0100
@@ -1287,7 +1287,7 @@
* @since 9
*/
static <K, V> Map<K, V> of() {
- return ImmutableCollections.Map0.instance();
+ return ImmutableCollections.emptyMap();
}
/**
@@ -1604,11 +1604,11 @@
@SuppressWarnings("varargs")
static <K, V> Map<K, V> ofEntries(Entry<? extends K, ? extends V>... entries) {
if (entries.length == 0) { // implicit null check of entries array
- return ImmutableCollections.Map0.instance();
+ return ImmutableCollections.emptyMap();
} else if (entries.length == 1) {
// implicit null check of the array slot
return new ImmutableCollections.Map1<>(entries[0].getKey(),
- entries[0].getValue());
+ entries[0].getValue());
} else {
Object[] kva = new Object[entries.length << 1];
int a = 0;