summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/javassist/ClassPool.java2
-rw-r--r--src/main/javassist/compiler/MemberResolver.java7
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;
}