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
Javassist incompatible with Mockito/Junit4.Result in Java 11 (due to IllegalAccess to Unsafe?) #227
Comments
Is this really a problem of Javassist? I cannot see javassist in basicTest or basicTest3. |
Regarding basicTest and basicTest3, I am currently investigating what is the real cause of the issue. I just noticed in Java 8, basicTest also throws, and basicTest3 does not have sense. |
|
I found a workaround so that
Is it something normal? Is there a way to avoid this workaround? |
Another issue with Java 11 is they added a new constant 17 CONSTANT_Dynamic. When will javassist support this constant? |
See issue #270 |
Versions:
When I try to invoke a method that either creates a
Mockito.mock
or ajunit.runner.Result
through Javassist, it does not work anymore when running with Java 11.This is surely because we have not access to
Unsafe
(see withbasicTest3
). I have tried to run withadd-opens java.base/jdk.internal.misc
andadd-opens java.base/jdk.internal.reflect
, without success.A simple example on how to reproduce the errors:
StackTraces:
basicTest
basicTest2
basicTest3
The text was updated successfully, but these errors were encountered: