SharedConstants still making issues.
This commit is contained in:
+7
-1
@@ -16,7 +16,9 @@ import speiger.src.collections.objects.maps.abstracts.ABSTRACT_MAP;
|
||||
import speiger.src.collections.objects.maps.interfaces.MAP;
|
||||
import speiger.src.collections.objects.sets.AbstractObjectSet;
|
||||
import speiger.src.collections.objects.sets.ObjectSet;
|
||||
#if UNSAVE_ENUM
|
||||
import sun.misc.SharedSecrets;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A Type Specific EnumMap implementation that allows for Primitive Values.
|
||||
@@ -211,8 +213,12 @@ public class ENUM_MAP KEY_ENUM_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE
|
||||
onNodeRemoved(index);
|
||||
}
|
||||
protected boolean isSet(int index) { return (present[index >> 6] & (1L << index)) != 0; }
|
||||
private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) {
|
||||
private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) {
|
||||
#if UNSAVE_ENUM
|
||||
return keyType.getEnumConstants();
|
||||
#else
|
||||
return SharedSecrets.getJavaLangAccess().getEnumConstantsShared(keyType);
|
||||
#endif
|
||||
}
|
||||
|
||||
class EntrySet extends AbstractObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> {
|
||||
|
||||
Reference in New Issue
Block a user