From 82e478b28515c7ca2936b3bdce92cbe5e593c7e6 Mon Sep 17 00:00:00 2001 From: chibash Date: Tue, 10 May 2022 18:21:13 +0900 Subject: [PATCH] changes test code because package java.rmi.activation.ActivationGroupDesc does not exist any longer. --- src/test/javassist/JvstTest2.java | 6 ++---- src/test/test2/Inner.java | 5 ++--- src/test/test2/Inner2.java | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 src/test/test2/Inner2.java diff --git a/src/test/javassist/JvstTest2.java b/src/test/javassist/JvstTest2.java index 0ea4571b..5d01961d 100644 --- a/src/test/javassist/JvstTest2.java +++ b/src/test/javassist/JvstTest2.java @@ -275,10 +275,8 @@ public class JvstTest2 extends JvstTestRoot { String src = "public void sampleMethod() throws Exception {" + "java.util.Properties props = new java.util.Properties();" - + "java.rmi.activation.ActivationGroupDesc.CommandEnvironment ace " - + " = null;" - + "java.rmi.activation.ActivationGroupDesc agd " - + " = new java.rmi.activation.ActivationGroupDesc(props,ace);}"; + + "test2.Inner2.Child ace = null;" + + "test2.Inner2 agd = new test2.Inner2(props, ace);}"; CtMethod newmethod = CtNewMethod.make(src, target); target.addMethod(newmethod); diff --git a/src/test/test2/Inner.java b/src/test/test2/Inner.java index 15e08663..bfc95044 100644 --- a/src/test/test2/Inner.java +++ b/src/test/test2/Inner.java @@ -4,9 +4,8 @@ package test2; public class Inner { public void sample() throws Exception { java.util.Properties props = new java.util.Properties(); - java.rmi.activation.ActivationGroupDesc.CommandEnvironment ace = null; - java.rmi.activation.ActivationGroupDesc agd = new - java.rmi.activation.ActivationGroupDesc(props,ace); + test2.Inner2.Child ace = null; + test2.Inner2 agd = new test2.Inner2(props, ace); } public static void main(String args[]) { System.out.println("Inner"); diff --git a/src/test/test2/Inner2.java b/src/test/test2/Inner2.java new file mode 100644 index 00000000..b9d81667 --- /dev/null +++ b/src/test/test2/Inner2.java @@ -0,0 +1,23 @@ +package test2; + +/** + * Used by test2.Inner + */ +public class Inner2 { + public static class Child { + public int value; + } + + private java.util.Properties p; + private Child c; + + public Inner2(java.util.Properties props, Child child) { + p = props; + c = child; + } + + public void print() { + System.out.println(p); + System.out.println(c); + } +} -- 2.39.5