From 6320bc4e14350af392b285b1b1ea312673625b21 Mon Sep 17 00:00:00 2001 From: chibash Date: Sat, 8 Sep 2018 15:47:38 +0900 Subject: changes CtClass#toClass() and ClassPool#toClass() etc. to support Java 11, in other words, java.lang.invoke.MethodHandles.Lookup. --- src/test/javassist/JvstTest5.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/javassist/JvstTest5.java') diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java index ec8ff66a..c5eff4d1 100644 --- a/src/test/javassist/JvstTest5.java +++ b/src/test/javassist/JvstTest5.java @@ -223,7 +223,7 @@ public class JvstTest5 extends JvstTestRoot { "}"); System.out.println(src); badClass.addMethod(CtMethod.make(src, badClass)); - Class clazzz = badClass.toClass(); + Class clazzz = badClass.toClass(Class.forName("DefineClassCapability")); Object obj = clazzz.getConstructor().newInstance(); // <-- falls here } @@ -451,6 +451,6 @@ public class JvstTest5 extends JvstTestRoot { public void testNestHostAttributeCopy() throws Exception { CtClass cc = sloader.get("test5.NestHost2$Foo"); cc.getClassFile().compact(); - cc.toClass(); + cc.toClass(test5.DefineClassCapability.class); } } -- cgit v1.2.3