diff options
author | chibash <chiba@javassist.org> | 2013-05-30 15:49:35 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2013-05-30 15:49:35 +0900 |
commit | f81b1ae4ed8787cdc19b47a561b4c776f48f9a3b (patch) | |
tree | c2dadf6705daaab2b38efa89bb649ad9c5fac821 /src/main | |
parent | 82948b782b92e8c1c2b7870e2abc313c298a2609 (diff) | |
download | javassist-f81b1ae4ed8787cdc19b47a561b4c776f48f9a3b.tar.gz javassist-f81b1ae4ed8787cdc19b47a561b4c776f48f9a3b.zip |
fixed JASSIST-188
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/javassist/ClassPool.java | 2 | ||||
-rw-r--r-- | src/main/javassist/compiler/MemberResolver.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/javassist/ClassPool.java b/src/main/javassist/ClassPool.java index 2c467fb2..4804b593 100644 --- a/src/main/javassist/ClassPool.java +++ b/src/main/javassist/ClassPool.java @@ -936,7 +936,7 @@ public class ClassPool { /** * Detatches the <code>ClassPath</code> object from the search path. * The detached <code>ClassPath</code> object cannot be added - * to the pathagain. + * to the path again. */ public void removeClassPath(ClassPath cp) { source.removeClassPath(cp); diff --git a/src/main/javassist/compiler/MemberResolver.java b/src/main/javassist/compiler/MemberResolver.java index 4ab304fe..f304b034 100644 --- a/src/main/javassist/compiler/MemberResolver.java +++ b/src/main/javassist/compiler/MemberResolver.java @@ -399,7 +399,10 @@ public class MemberResolver implements TokenId { if (found == INVALID) throw new CompileError("no such class: " + name); else if (found != null) - return (CtClass)found; + try { + return classPool.get((String)found); + } + catch (NotFoundException e) {} CtClass cc = null; try { @@ -409,7 +412,7 @@ public class MemberResolver implements TokenId { cc = searchImports(name); } - cache.put(name, cc); + cache.put(name, cc.getName()); return cc; } |