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
ClassPool.makePackage alternative for for Java11 #246
Comments
Note: Adding --add-opens java.base/java.lang=ALL-UNNAMED (as described in javadocs) in VM options also doesn't seem to work for me in JDK11 |
Seems the java doc in ClassPool is incorrect and needs to be update: javassist/src/main/javassist/ClassPool.java Line 1249 in f36195c
Due to it will not be supported in Java9+:
|
One PR to update java doc: |
hi @NingZhang-e |
I can not figure out a graceful way to go forward. Because define new package conflict with jigsaw policy. |
3.25 fixes: - jboss-javassist/javassist#72 - jboss-javassist/javassist#241 - jboss-javassist/javassist#242 - jboss-javassist/javassist#246 - jboss-javassist/javassist#252 3.26 fixes: - jboss-javassist/javassist#265 - jboss-javassist/javassist#270 - jboss-javassist/javassist#271 - jboss-javassist/javassist#275 Of these #270 is most important, as it fixes an issue we've seen with powermock downstream. Change-Id: Ib4d75d6411e71438436249a8eb9313ccf4411ca2 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3.25 fixes: - jboss-javassist/javassist#72 - jboss-javassist/javassist#241 - jboss-javassist/javassist#242 - jboss-javassist/javassist#246 - jboss-javassist/javassist#252 3.26 fixes: - jboss-javassist/javassist#265 - jboss-javassist/javassist#270 - jboss-javassist/javassist#271 - jboss-javassist/javassist#275 Of these #270 is most important, as it fixes an issue we've seen with powermock downstream. Change-Id: Ib4d75d6411e71438436249a8eb9313ccf4411ca2 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 6a404f1)
3.25 fixes: - jboss-javassist/javassist#72 - jboss-javassist/javassist#241 - jboss-javassist/javassist#242 - jboss-javassist/javassist#246 - jboss-javassist/javassist#252 3.26 fixes: - jboss-javassist/javassist#265 - jboss-javassist/javassist#270 - jboss-javassist/javassist#271 - jboss-javassist/javassist#275 Of these #270 is most important, as it fixes an issue we've seen with powermock downstream. Change-Id: Ib4d75d6411e71438436249a8eb9313ccf4411ca2 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 6a404f1)
Hi,
We were using classPool.makePackage(currClassLoader, ctClass.getPackageName()) in our code to create a package at runtime.
This is deprecated in Java9+. What is the recommended way of achieving this in Java11? Could you point me to the resources on how to fix this?
The text was updated successfully, but these errors were encountered: