diff options
author | chibash <chiba@javassist.org> | 2018-09-08 16:26:19 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2018-09-08 16:26:19 +0900 |
commit | 69aee223df48fd783fb1d0a9be0f31f0ad54147f (patch) | |
tree | d9ba2db519b53f1f199858a900ad703fbbeef024 /src/main/javassist/CtClass.java | |
parent | 6320bc4e14350af392b285b1b1ea312673625b21 (diff) | |
download | javassist-69aee223df48fd783fb1d0a9be0f31f0ad54147f.tar.gz javassist-69aee223df48fd783fb1d0a9be0f31f0ad54147f.zip |
modifies javassist.util.proxy.DefinePackageHelper to be compatible to Java 11.
It also adds a javadoc comment to CtClass#toClass() to recommend the users to use #toClass(Class) or #toClass(Lookup).
Diffstat (limited to 'src/main/javassist/CtClass.java')
-rw-r--r-- | src/main/javassist/CtClass.java | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/main/javassist/CtClass.java b/src/main/javassist/CtClass.java index 333a17d4..140a9cab 100644 --- a/src/main/javassist/CtClass.java +++ b/src/main/javassist/CtClass.java @@ -1261,15 +1261,26 @@ public abstract class CtClass { * server, the context class loader might be inappropriate to load the * class. * - * <p>This method is provided for convenience. If you need more - * complex functionality, you should write your own class loader. + * <p><b>Warning:</b> In Java 11 or later, the call to this method will + * print a warning message: + * <blockquote><pre> + * WARNING: An illegal reflective access operation has occurred + * WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions$3 ... + * WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions$3 + * WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations + * WARNING: All illegal access operations will be denied in a future release + * </pre></blockquote> + * To avoid this message, use {@link #toClass(Class)} + * or {@link #toClass(java.lang.invoke.MethodHandles.Lookup)}. + * {@link #toClass()} will be unavailable in a future release. + * </p> + * + * <p><b>Warning:</b> A Class object returned by this method may not + * work with a security manager or a signed jar file because a + * protection domain is not specified.</p> * * <p>Note: this method calls <code>toClass()</code> - * in <code>ClassPool</code>. - * - * <p><b>Warining:</b> A Class object returned by this method may not - * work with a security manager or a signed jar file because a - * protection domain is not specified. + * in <code>ClassPool</code>.</p> * * @see #toClass(java.lang.invoke.MethodHandles.Lookup) * @see #toClass(Class) @@ -1290,7 +1301,7 @@ public abstract class CtClass { * <p>Note: this method calls <code>toClass()</code> * in <code>ClassPool</code>. * - * <p><b>Warining:</b> A Class object returned by this method may not + * <p><b>Warning:</b> A Class object returned by this method may not * work with a security manager or a signed jar file because a * protection domain is not specified. * @@ -1315,7 +1326,7 @@ public abstract class CtClass { * <p>Note: this method calls <code>toClass()</code> * in <code>ClassPool</code>. * - * <p><b>Warining:</b> A Class object returned by this method may not + * <p><b>Warning:</b> A Class object returned by this method may not * work with a security manager or a signed jar file because a * protection domain is not specified. * @@ -1374,7 +1385,7 @@ public abstract class CtClass { /** * Converts this class to a <code>java.lang.Class</code> object. * - * <p><b>Warining:</b> A Class object returned by this method may not + * <p><b>Warning:</b> A Class object returned by this method may not * work with a security manager or a signed jar file because a * protection domain is not specified. * |