Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from hacking EnumHelper private apis to a java 9+ compatible reflection/unsafe approach #19

Merged
merged 4 commits into from Jan 29, 2023

Conversation

eigenraven
Copy link
Member

In order to make EnumHelper java 9+ compatible lwjgl3ify has to change its internals significantly, and doesn't preserve all the private methods as they don't all make sense to exist. This seems to be the only mod depending on them, so I include a j9+ compatible implementation of what it needs here. Also added clearing the enum cache after modifying it because it wasn't doing it before, which could lead to unpredictable runtime behavior.

@eigenraven eigenraven requested review from a team January 20, 2023 21:38
Copy link

@Glease Glease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming there isn't any other cache in java.lang.reflect you need to clear this should work.

@Dream-Master Dream-Master merged commit ac35f7a into master Jan 29, 2023
@Dream-Master Dream-Master deleted the fix-j11-reflection branch January 29, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants