1.1 --- a/rt/emul/compact/src/main/java/java/util/EnumSet.java Sun Sep 22 21:51:56 2013 +0200
1.2 +++ b/rt/emul/compact/src/main/java/java/util/EnumSet.java Sun Sep 22 21:56:49 2013 +0200
1.3 @@ -25,7 +25,7 @@
1.4
1.5 package java.util;
1.6
1.7 -import sun.misc.SharedSecrets;
1.8 +import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.9
1.10 /**
1.11 * A specialized {@link Set} implementation for use with enum types. All of
1.12 @@ -384,10 +384,8 @@
1.13 * Returns all of the values comprising E.
1.14 * The result is uncloned, cached, and shared by all callers.
1.15 */
1.16 - private static <E extends Enum<E>> E[] getUniverse(Class<E> elementType) {
1.17 - return SharedSecrets.getJavaLangAccess()
1.18 - .getEnumConstantsShared(elementType);
1.19 - }
1.20 + @JavaScriptBody(args = { "enumType" }, body = "return enumType.cnstr.$VALUES;")
1.21 + private static native <E extends Enum<E>> E[] getUniverse(Class<E> elementType);
1.22
1.23 /**
1.24 * This class is used to serialize all EnumSet instances, regardless of