Reviewers: rdayal, scottb, zundel,
Description:
While using GWT Designer the class path cache in ResourceOracleImpl
never gets cleared of obsolete data.
Please review this at http://gwt-code-reviews.appspot.com/1308801/show
Affected files:
dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
### Eclipse Workspace Patch 1.0
#P trunk
Index: dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
===================================================================
--- dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
(revision 9519)
+++ dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
(working copy)
@@ -24,6 +24,9 @@
import com.google.gwt.dev.util.msg.Message0;
import com.google.gwt.dev.util.msg.Message1String;
+import org.apache.commons.collections.map.AbstractReferenceMap;
+import org.apache.commons.collections.map.ReferenceMap;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -141,7 +144,9 @@
}
}
- private static final Map<ClassLoader, List<ClassPathEntry>>
classPathCache = new HashMap<ClassLoader, List<ClassPathEntry>>();
+ @SuppressWarnings("unchecked")
+ private static final Map<ClassLoader, List<ClassPathEntry>>
classPathCache = new ReferenceMap(
+ AbstractReferenceMap.WEAK, AbstractReferenceMap.HARD);
public static ClassPathEntry createEntryForUrl(TreeLogger logger, URL
url)
throws URISyntaxException, IOException {
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors