aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/javassist/JvstTest5.java
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2016-02-24 01:57:05 +0900
committerchibash <chiba@javassist.org>2016-02-24 01:57:05 +0900
commitb110efa847be1d1f7c9d4932def4b49ea8a6dcaf (patch)
tree39f2b37cedc3f1c603de225b0f3b437e32d73a46 /src/test/javassist/JvstTest5.java
parentd2d00601aa273adc4ceb47cc449fada0d35cb893 (diff)
downloadjavassist-b110efa847be1d1f7c9d4932def4b49ea8a6dcaf.tar.gz
javassist-b110efa847be1d1f7c9d4932def4b49ea8a6dcaf.zip
fixes JIRA JASSIST-250
Diffstat (limited to 'src/test/javassist/JvstTest5.java')
-rw-r--r--src/test/javassist/JvstTest5.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java
index 3c195faf..33740f7f 100644
--- a/src/test/javassist/JvstTest5.java
+++ b/src/test/javassist/JvstTest5.java
@@ -171,6 +171,18 @@ public class JvstTest5 extends JvstTestRoot {
assertEquals(1, annotations.length);
}
+ public void testJIRA250() throws Exception {
+ CtClass cc = sloader.makeClass("test5.JIRA250", sloader.get("test5.JIRA250Super"));
+ cc.addMethod(CtNewMethod.make(
+ " public test5.JIRA250Bar getBar() {" +
+ " return super.getBar();\n" +
+ " }\n", cc));
+ cc.addMethod(CtNewMethod.make("public int run() { getBar(); return 1; }", cc));
+ cc.writeFile();
+ Object obj = make(cc.getName());
+ assertEquals(1, invoke(obj, "run"));
+ }
+
public void testProceedToDefaultMethod() throws Exception {
CtClass cc = ClassPool.getDefault().get("test5.ProceedDefault");
CtMethod mth = cc.getDeclaredMethod("bar");