Tweak to allow parent ClassLoader at design time.
Review at http://gwt-code-reviews.appspot.com/1529803
Review by: tobyr@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10539 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
index 6b05280..367144d 100644
--- a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
+++ b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
@@ -51,6 +51,7 @@
import org.apache.commons.collections.map.ReferenceIdentityMap;
import org.apache.commons.collections.map.ReferenceMap;
+import java.beans.Beans;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -1179,6 +1180,11 @@
*/
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ // at design time we want to provide parent ClassLoader, so keep default implementation
+ if (Beans.isDesignTime()) {
+ return super.loadClass(name, resolve);
+ }
+
Class c = findLoadedClass(name);
if (c != null) {
if (resolve) {