Our implementation of Class.getEnumConstantsShared() assumes that the compiler has generated a field called $VALUES in Enum classes but this is only what javac does (the Eclipse compiler, for example, calls this field ENUM$VALUES).
The JDK implementation of this method depends on the generated method values, which is required for other Enum uses, as well.
We should update our implementation to use this approach, instead of relying on this specific behaviour of javac.
Our implementation of
Class.getEnumConstantsShared()
assumes that the compiler has generated a field called$VALUES
inEnum
classes but this is only whatjavac
does (the Eclipse compiler, for example, calls this fieldENUM$VALUES
).The JDK implementation of this method depends on the generated method
values
, which is required for otherEnum
uses, as well.We should update our implementation to use this approach, instead of relying on this specific behaviour of
javac
.