1.1 --- a/rt/emul/compact/src/main/java/java/util/EnumMap.java Sun Sep 22 21:51:56 2013 +0200
1.2 +++ b/rt/emul/compact/src/main/java/java/util/EnumMap.java Sun Sep 22 21:56:49 2013 +0200
1.3 @@ -26,7 +26,7 @@
1.4 package java.util;
1.5
1.6 import java.util.Map.Entry;
1.7 -import sun.misc.SharedSecrets;
1.8 +import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.9
1.10 /**
1.11 * A specialized {@link Map} implementation for use with enum type keys. All
1.12 @@ -737,10 +737,8 @@
1.13 * Returns all of the values comprising K.
1.14 * The result is uncloned, cached, and shared by all callers.
1.15 */
1.16 - private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) {
1.17 - return SharedSecrets.getJavaLangAccess()
1.18 - .getEnumConstantsShared(keyType);
1.19 - }
1.20 + @JavaScriptBody(args = { "enumType" }, body = "return enumType.cnstr.$VALUES;")
1.21 + private static native <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType);
1.22
1.23 private static final long serialVersionUID = 458661240069192865L;
1.24