summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorJeroen Frijters <jeroen@sumatra.nl>2007-06-21 05:43:37 +0000
committerJeroen Frijters <jeroen@sumatra.nl>2007-06-21 05:43:37 +0000
commit3ba9b259728656bfda2eed6cf438e13275b305ca (patch)
tree598b71cdedda5f86e1e59e58c1f661389d58665c /java
parentd823a587777da37431ad5abf1ed69fc1a81ce1dc (diff)
downloadclasspath-3ba9b259728656bfda2eed6cf438e13275b305ca.tar.gz
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.
Diffstat (limited to 'java')
-rw-r--r--java/net/URLClassLoader.java10
1 files changed, 3 insertions, 7 deletions
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);
}
}