summaryrefslogtreecommitdiffstats
path: root/src/test/javassist
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/javassist')
-rw-r--r--src/test/javassist/JvstTest4.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java
index 7cf6178a..768b7400 100644
--- a/src/test/javassist/JvstTest4.java
+++ b/src/test/javassist/JvstTest4.java
@@ -817,4 +817,15 @@ public class JvstTest4 extends JvstTestRoot {
assertEquals(10, invoke(obj, "test33"));
assertEquals(100, invoke(obj, "test44"));
}
+
+ public void testJIRA186() throws Exception {
+ CtClass cc = sloader.get("test4.JIRA186");
+ cc.getDeclaredMethod("test").insertBefore("{" +
+ " java.util.List l = new java.util.ArrayList();" +
+ " l.add(this.toString());" +
+ "}");
+ cc.writeFile();
+ Object obj = make(cc.getName());
+ assertEquals(1, invoke(obj, "test"));
+ }
}