src/java.base/share/classes/java/util/Map.java
changeset 49283 a14ede52a278
parent 48059 6ee80cd217e0
child 49433 b6671a111395
--- 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;