From 2e1cdf42c62c8b9f63ffaf7fbc02b4fabe511146 Mon Sep 17 00:00:00 2001 From: chibash Date: Sat, 10 May 2014 14:19:38 +0900 Subject: fixed JIRA223 --- Readme.html | 2 +- javassist.jar | Bin 707490 -> 684237 bytes src/main/javassist/expr/FieldAccess.java | 5 ++++- src/test/javassist/JvstTest4.java | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Readme.html b/Readme.html index 251e0e95..618562d1 100644 --- a/Readme.html +++ b/Readme.html @@ -283,7 +283,7 @@ see javassist.Dump.

-version 3.19

diff --git a/javassist.jar b/javassist.jar index f3ef43a3..e2b447e1 100644 Binary files a/javassist.jar and b/javassist.jar differ 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 { -- cgit v1.2.3