summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--java/net/URLClassLoader.java10
2 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 51838ac35..4bf4d950e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-06-21 Jeroen Frijters <jeroen@frijters.net>
+ * java/net/URLClassLoader.java
+ (URLClassLoader(URL[],ClassLoader,URLStreamHandlerFactory):
+ Add factory to cache before calling addURLS.
+ (run): Don't call initCause() on ClassNotFoundException.
+
+2007-06-21 Jeroen Frijters <jeroen@frijters.net>
+
Fixes #32356
* java/lang/reflect/Array.java
(newInstance(Class,int[])): Call createMultiArray correctly.
diff --git a/java/net/URLClassLoader.java b/java/net/URLClassLoader.java
index 6df2818c5..346f51c5d 100644
--- a/java/net/URLClassLoader.java
+++ b/java/net/URLClassLoader.java
@@ -262,10 +262,9 @@ public class URLClassLoader extends SecureClassLoader
super(parent);
this.securityContext = null;
this.factory = factory;
- addURLs(urls);
-
- // If this factory is still not in factoryCache, add it.
+ // If this factory is not yet in factoryCache, add it.
factoryCache.add(factory);
+ addURLs(urls);
}
// Methods
@@ -624,10 +623,7 @@ public class URLClassLoader extends SecureClassLoader
}
catch (IOException ioe)
{
- ClassNotFoundException cnfe;
- cnfe = new ClassNotFoundException(className + " not found in " + this);
- cnfe.initCause(ioe);
- throw cnfe;
+ throw new ClassNotFoundException(className + " not found in " + this, ioe);
}
}