diff options
author | Deepak Bhole <[email protected]> | 2011-03-04 17:34:32 -0500 |
---|---|---|
committer | Deepak Bhole <[email protected]> | 2011-03-04 17:34:32 -0500 |
commit | 0b38becc8ddeb3026d5fa0ca89713cb3e38ac430 (patch) | |
tree | b73cf798610230ad338b43b6865766f840aa1279 /netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | |
parent | eb116d00b1dfee2df7b1dc6191d388a4b0f4b846 (diff) |
- PR475, RH604061: Allow applets from the same page to use the same classloader
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java index fca019e..26eb799 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java @@ -199,8 +199,16 @@ class JNLPSecurityManager extends AWTSecurityManager { // this needs to be tightened up for (int i = 0; i < stack.length && i < maxDepth; i++) { - if (stack[i].getClassLoader() instanceof JNLPClassLoader) { - JNLPClassLoader loader = (JNLPClassLoader) stack[i].getClassLoader(); + ClassLoader cl = stack[i].getClassLoader(); + + // Since we want to deal with JNLPClassLoader, extract it if this + // is a codebase loader + if (cl instanceof JNLPClassLoader.CodeBaseClassLoader) + cl = ((JNLPClassLoader.CodeBaseClassLoader) cl).getParentJNLPClassLoader(); + + if (cl instanceof JNLPClassLoader) { + + JNLPClassLoader loader = (JNLPClassLoader) cl; if (loader != null && loader.getApplication() != null) { return loader.getApplication(); |