aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/javassist/JvstTest4.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2013-04-12 09:21:45 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2013-04-12 09:21:45 +0000
commitd5500a2a6f5703f10a703ad6498e28c52c367104 (patch)
tree3387a12b5552c2f286594c3dfce74989ed9b9eb0 /src/test/javassist/JvstTest4.java
parent91f6abdd9e1e637251e9bfae381afc0c6a47c1b9 (diff)
downloadjavassist-d5500a2a6f5703f10a703ad6498e28c52c367104.tar.gz
javassist-d5500a2a6f5703f10a703ad6498e28c52c367104.zip
fixed JASSIST-186
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@702 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/test/javassist/JvstTest4.java')
-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"));
+ }
}