diff options
author | Adam Domurad <[email protected]> | 2013-01-03 13:17:37 -0500 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-01-03 13:17:37 -0500 |
commit | d1ca9a30f57331877bf8e87927bf6f46aba12d62 (patch) | |
tree | ecd9b54b1f18143289bebce52d61f583434bc4e2 /netx/net/sourceforge/jnlp | |
parent | 76b269de114c531cf01187dc29caa9a76de34580 (diff) |
Fix CodeBaseClassLoaderTest.testParentClassLoaderIsAskedForClassesApplication
Diffstat (limited to 'netx/net/sourceforge/jnlp')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java index 60d4193..26e0b5d 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java @@ -1704,7 +1704,7 @@ public class JNLPClassLoader extends URLClassLoader { // Try codebase loader if (codeBaseLoader != null) - return codeBaseLoader.findClass(name); + return codeBaseLoader.findClassNonRecursive(name); // All else failed. Throw CNFE throw new ClassNotFoundException(name); @@ -2287,8 +2287,7 @@ public class JNLPClassLoader extends URLClassLoader { super.addURL(url); } - @Override - public Class<?> findClass(String name) throws ClassNotFoundException { + Class<?> findClassNonRecursive(String name) throws ClassNotFoundException { // If we have searched this path before, don't try again if (Arrays.equals(super.getURLs(), notFoundResources.get(name))) throw new ClassNotFoundException(name); @@ -2310,6 +2309,12 @@ public class JNLPClassLoader extends URLClassLoader { } } + @Override + public Class<?> findClass(String name) throws ClassNotFoundException { + // Calls JNLPClassLoader#findClass which may call into this.findClassNonRecursive + return getParentJNLPClassLoader().findClass(name); + } + /** * Returns the output of super.findLoadedClass(). * |