Adds @SpecializeMethod to AbstractHashMap.containsKey() Change-Id: I1fc3919131da6f5f5b7434e19c176c506501b3d8
diff --git a/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java b/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java index a186c98..3fa35b4 100644 --- a/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java +++ b/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java
@@ -211,6 +211,7 @@ clearImpl(); } + @SpecializeMethod(params = {String.class}, target = "hasStringValue") @Override public boolean containsKey(Object key) { return (key == null) ? nullSlotLive : (!(key instanceof String) @@ -413,7 +414,10 @@ /** * Returns true if the given key exists in the stringMap. */ - private native boolean hasStringValue(String key) /*-{ + protected native boolean hasStringValue(String key) /*-{ + if (key == null) { + return this.@java.util.AbstractHashMap::nullSlotLive; + } return (':' + key) in this.@java.util.AbstractHashMap::stringMap; }-*/;