Fixes a problem where a JSNI reference to a nonexistent inner type would cause us to produce two compilation units for the same type, causing problems.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1913 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java b/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java
index eb8dfd3..ea8406e 100644
--- a/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java
@@ -158,12 +158,7 @@
final String msg = "Need additional type '" + typeName + "'";
logger.log(TreeLogger.SPAM, msg, null);
- // This causes the compiler to find the additional type, possibly
- // winding its back to ask for the compilation unit from the source
- // oracle.
- //
- char[][] chars = CharOperation.splitOn('.', typeName.toCharArray());
- lookupEnvironment.getType(chars);
+ resolvePossiblyNestedType(typeName);
}
typeNames = doFindAdditionalTypesUsingRebinds(logger, cud);
@@ -341,6 +336,10 @@
int pos = qname.indexOf('$');
if (pos >= 0) {
qname = qname.substring(0, pos);
+ // Recheck the cache for the outer type.
+ if (nameEnvironmentAnswerForTypeName.containsKey(qname)) {
+ return (nameEnvironmentAnswerForTypeName.get(qname));
+ }
}
CompilationUnitProvider cup;
try {