summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2013-05-27 19:21:04 +0900
committerchibash <chiba@javassist.org>2013-05-27 19:21:04 +0900
commit82948b782b92e8c1c2b7870e2abc313c298a2609 (patch)
tree82b216cd6fde0c86984989dd1dbf94792f614a64
parent29a580826f0372878e786e8a60c2f69713db1ecc (diff)
downloadjavassist-82948b782b92e8c1c2b7870e2abc313c298a2609.tar.gz
javassist-82948b782b92e8c1c2b7870e2abc313c298a2609.zip
fixed JASSIST-195
-rw-r--r--src/test/test4/JIRA195.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/test4/JIRA195.java b/src/test/test4/JIRA195.java
new file mode 100644
index 00000000..13b91d13
--- /dev/null
+++ b/src/test/test4/JIRA195.java
@@ -0,0 +1,31 @@
+package test4;
+
+import javassist.ClassPool;
+import javassist.CtClass;
+import javassist.CtMethod;
+
+public class JIRA195 {
+ public int run() { return test(3); }
+
+ public int test(int i) {
+ try {}
+ catch (Throwable t) {}
+ finally {
+ i = incByOne(i);
+ }
+
+ return i;
+ }
+
+ private int incByOne(int i) {
+ return i + 1;
+ }
+
+ public static void main(String[] args) throws Exception {
+ ClassPool cp = new ClassPool();
+ cp.appendClassPath("./target/test-classes");
+ CtClass cc = cp.get("test4.JIRA195");
+ CtMethod mth = cc.getDeclaredMethod("test");
+ mth.getMethodInfo().rebuildStackMap(cc.getClassPool());
+ }
+}