Pārlūkot izejas kodu

fixed JASSIST-195

tags/log
chibash pirms 11 gadiem
vecāks
revīzija
82948b782b
1 mainītis faili ar 31 papildinājumiem un 0 dzēšanām
  1. 31
    0
      src/test/test4/JIRA195.java

+ 31
- 0
src/test/test4/JIRA195.java Parādīt failu

@@ -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());
}
}

Notiek ielāde…
Atcelt
Saglabāt