diff options
author | chibash <chiba@javassist.org> | 2014-05-10 14:19:38 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2014-05-10 14:19:38 +0900 |
commit | 6875ab76f272c01fd41f60983154241daf3eb22f (patch) | |
tree | feb7bc155708e1f6f22e176f18f2536c306c00c1 /src | |
parent | fd785d5ee3725cff93d6c391bb77ca11835c59b8 (diff) | |
download | javassist-6875ab76f272c01fd41f60983154241daf3eb22f.tar.gz javassist-6875ab76f272c01fd41f60983154241daf3eb22f.zip |
fixed JIRA223
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/expr/FieldAccess.java | 5 | ||||
-rw-r--r-- | src/test/javassist/JvstTest4.java | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/javassist/expr/FieldAccess.java b/src/main/javassist/expr/FieldAccess.java index 01658ed6..7c6d2691 100644 --- a/src/main/javassist/expr/FieldAccess.java +++ b/src/main/javassist/expr/FieldAccess.java @@ -111,7 +111,10 @@ public class FieldAccess extends Expr { */ public CtField getField() throws NotFoundException { CtClass cc = getCtClass(); - return cc.getField(getFieldName()); + int index = iterator.u16bitAt(currentPos + 1); + ConstPool cp = getConstPool(); + return cc.getField(cp.getFieldrefName(index), cp.getFieldrefType(index)); + //return cc.getField(getFieldName()); } /** diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java index f1aca09e..8e60c16a 100644 --- a/src/test/javassist/JvstTest4.java +++ b/src/test/javassist/JvstTest4.java @@ -657,8 +657,8 @@ public class JvstTest4 extends JvstTestRoot { long t2 = endTime2 - endTime; long t3 = endTime3 - endTime2; System.out.println("JIRA150: " + t1 + ", " + t2 + ", " + t3); - assertTrue(t2 < t1 * 3); - assertTrue(t3 < t1 * 2); + assertTrue(t2 < t1 * 4); + assertTrue(t3 < t1 * 3); } public void testJIRA150b() throws Exception { |