diff options
author | chibash <chiba@javassist.org> | 2017-05-31 17:44:26 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2017-05-31 17:44:26 +0900 |
commit | ab117a9fe31902167b9a74fee1982068e4c4d095 (patch) | |
tree | 75195e9d7fb36f7bb56bdd00faf7dbfc44ed8276 | |
parent | 873e5a5ef8e356362bff17a4975a0a60266b65a5 (diff) | |
download | javassist-ab117a9fe31902167b9a74fee1982068e4c4d095.tar.gz javassist-ab117a9fe31902167b9a74fee1982068e4c4d095.zip |
delete testHotswap() because java 9 does not seem to allow a java agent to be attached after the JVM starts
-rw-r--r-- | javassist.jar | bin | 727942 -> 727192 bytes | |||
-rw-r--r-- | src/main/javassist/util/HotSwapAgent.java | 3 | ||||
-rw-r--r-- | src/test/javassist/HotswapTest.java | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/javassist.jar b/javassist.jar Binary files differindex ce389bac..2f0ef0fb 100644 --- a/javassist.jar +++ b/javassist.jar diff --git a/src/main/javassist/util/HotSwapAgent.java b/src/main/javassist/util/HotSwapAgent.java index 5bfbe53c..f9c3a836 100644 --- a/src/main/javassist/util/HotSwapAgent.java +++ b/src/main/javassist/util/HotSwapAgent.java @@ -149,9 +149,8 @@ public class HotSwapAgent { String nameOfRunningVM = ManagementFactory.getRuntimeMXBean().getName(); String pid = nameOfRunningVM.substring(0, nameOfRunningVM.indexOf('@')); - VirtualMachine vm = VirtualMachine.attach(pid); - vm.loadAgent(agentJar.getAbsolutePath(), ""); + vm.loadAgent(agentJar.getAbsolutePath(), null); vm.detach(); } catch (Exception e) { diff --git a/src/test/javassist/HotswapTest.java b/src/test/javassist/HotswapTest.java index 8b4db598..deab8fad 100644 --- a/src/test/javassist/HotswapTest.java +++ b/src/test/javassist/HotswapTest.java @@ -18,6 +18,10 @@ public class HotswapTest extends TestCase { } public void testHotswap() throws Exception { + if (javassist.bytecode.ClassFile.MAJOR_VERSION + >= javassist.bytecode.ClassFile.JAVA_9) + return; + Foo f = new Foo(); assertEquals(1, f.foo()); |