diff options
Diffstat (limited to 'src/test/javassist/JvstTest4.java')
-rw-r--r-- | src/test/javassist/JvstTest4.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java index b3b04c29..85ee4b0f 100644 --- a/src/test/javassist/JvstTest4.java +++ b/src/test/javassist/JvstTest4.java @@ -903,4 +903,20 @@ public class JvstTest4 extends JvstTestRoot { Object obj = make(cc.getName()); assertEquals(15, invoke(obj, "run")); } + + public void testJIRA207() throws Exception { + CtClass cc = sloader.get("test4.JIRA207"); + CtMethod cm = cc.getDeclaredMethod("foo"); + cm.insertBefore("throw new Exception();"); + + CtMethod cm2 = cc.getDeclaredMethod("run2"); + cm2.insertBefore("throw new Exception();"); + cc.writeFile(); + Object obj = make(cc.getName()); + try { + invoke(obj, "run2"); + fail("run2"); + } + catch (Exception e) {} + } } |