summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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());
+ }
+}