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
Internal APIs stricter access on Java11 require unit tests and example change #2
Comments
Post this issue on javassist page: |
I just tried some workaround to bypass Java11 issue: create one temp class extend Java built-in class, then create proxy of this created temp class.
It works well. |
Someone else fixed the issue in their own project: |
There is already one fix for this issue. Then we could wait for new release of javassist, then update pom and deliver a new release. |
Change javassist version to 3.24.0-GA which support Java11 and switch to JDK11 to build this project.
Many unit tests will fail, like DelegateProxyTest.createNewProxyClass():
Because unit test is executed on ArrayList which is Java internal class, the error happened.
I created one unit test towards javassist directly:
Same error will happen. If changing HashMap to one customized new class, there is no such issue.
Here is one article to describe the possible reason:
https://blog.codefx.org/java/java-11-migration-guide/#Illegal-Access-To-Internal-APIs
The text was updated successfully, but these errors were encountered: