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

Fix changing final fields on Java 12 #1010


Copy link

Vampire commented Sep 17, 2019

This also properly fixes #939 and removes the work-around that was put in place with #955.
If Java compatibility gets increased to Java 9 or newer, MethodHandle and VarHandle could be used afair.
But as Java compatibility is 7 currently, I solved it by using yet another private detail,
the method that delivers the declared fields unfiltered where the modifiers field is still included.


This comment has been minimized.

Copy link

sfuhrm commented Oct 16, 2019

@thekingnothing is there any chance we can see this being merged? It is very important for JDK 12+ support.

@thekingnothing thekingnothing merged commit 3eb2192 into powermock:release/2.x Oct 16, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.