-
Notifications
You must be signed in to change notification settings - Fork 143
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
Classes generated by PFL's Wrapper are sometimes incompatible with JDK17 #23628
Comments
I switched this issue to a bug, because the solution in #23621 doesn't play well with proxies. That was discovered when I resuscitated ejb_all tests under #23507 , so it will go both under single PR, because merged state always have to pass all tests and has to be stable. The issue is that the generating code by MethodHandles is more strict than the code generated by ClassLoader.defineClass.
|
Relates to eclipse-ee4j/orb-gmbal-pfl#43 and #23616 |
…d deprecated Proxy.getProxyClass - EJB tests failed on JDK17 because of this - also more consistent generateAndLoad (to be finished in next commits)
- not completely as under some circumstances we cannot live without them - but we can decide when - if the class was generated in the same package, the usage and the classloader are suitable, we can use MethodHandles. Otherwise we have to use the ClassLoader.defineClass method (accessed by reflection) - we had to avoid using Base class from PFL, because it uses just MethodHandles XOR ClassLoader XOR Unsafe depending on the JDK. - this solution was tested by - glassfish's ejb_all tests with JDK11 and JDK17 - TCK/ejb with JDK11
…ot in the same package - that means that we cannot use the MethodHandles.Looku.defineClass impl
- formatting of the code to make it easier to read - fixed several log messages (wrong formatting) - ContainerInfo used to reduce duplications - replaced several deprecated method calls with simple straight replacements - deleted 20 years old TODOs
- now ClassGenerator is responsible for everything around this.
- now ClassGenerator is responsible for everything around this.
- now ClassGenerator is responsible for everything around this.
When I implemented #23621 changes, I tried to follow instructions on @deprecated methods of the Wrapper class, but tests then failed.
Btw we already have javaassist in dependencies.
This issue relates also to #23627, because on modern JDK's that mess between packages brings serious issues around modularity and classloading rules.
The text was updated successfully, but these errors were encountered: