/hg/icedtea-web: Fix concurrent classloading problem in JNLPClas...
dlila at icedtea.classpath.org
dlila at icedtea.classpath.org
Mon Apr 18 12:09:54 PDT 2011
changeset 37f99d9fbdeb in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=37f99d9fbdeb
author: Denis Lila <dlila at redhat.com>
date: Mon Apr 18 15:13:23 2011 -0400
Fix concurrent classloading problem in JNLPClassLoader.loadClass.
diffstat:
ChangeLog | 8 ++++++++
netx/net/sourceforge/jnlp/Launcher.java | 1 -
netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 6 ++++--
3 files changed, 12 insertions(+), 3 deletions(-)
diffs (63 lines):
diff -r c083edb1ce29 -r 37f99d9fbdeb ChangeLog
--- a/ChangeLog Mon Apr 18 18:44:40 2011 +0100
+++ b/ChangeLog Mon Apr 18 15:13:23 2011 -0400
@@ -1,3 +1,11 @@
+2011-04-18 Denis Lila <dlila at redhat.com>
+
+ * netx/net/sourceforge/jnlp/Launcher.java:
+ Remove unused import.
+ * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+ Add annotation to suppress warning.
+ (loadClass): Make synchronized.
+
2010-04-14 Andrew John Hughes <ahughes at redhat.com>
* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java,
diff -r c083edb1ce29 -r 37f99d9fbdeb netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java Mon Apr 18 18:44:40 2011 +0100
+++ b/netx/net/sourceforge/jnlp/Launcher.java Mon Apr 18 15:13:23 2011 -0400
@@ -31,7 +31,6 @@
import java.util.jar.JarFile;
import net.sourceforge.jnlp.cache.CacheUtil;
-import net.sourceforge.jnlp.cache.ResourceTracker;
import net.sourceforge.jnlp.cache.UpdatePolicy;
import net.sourceforge.jnlp.runtime.AppThreadGroup;
import net.sourceforge.jnlp.runtime.AppletInstance;
diff -r c083edb1ce29 -r 37f99d9fbdeb netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Apr 18 18:44:40 2011 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Apr 18 15:13:23 2011 -0400
@@ -650,6 +650,7 @@
protected void activateJars(final List<JARDesc> jars) {
PrivilegedAction<Void> activate = new PrivilegedAction<Void>() {
+ @SuppressWarnings("deprecation")
public Void run() {
// transfer the Jars
waitForJars(jars);
@@ -983,7 +984,7 @@
* classloader, or one of the classloaders for the JNLP file's
* extensions.
*/
- public Class<?> loadClass(String name) throws ClassNotFoundException {
+ public synchronized Class<?> loadClass(String name) throws ClassNotFoundException {
Class<?> result = findLoadedClassAll(name);
@@ -1003,7 +1004,7 @@
// validPackage(name);
// search this and the extension loaders
- if (result == null)
+ if (result == null) {
try {
result = loadClassExt(name);
} catch (ClassNotFoundException cnfe) {
@@ -1060,6 +1061,7 @@
}
}
}
+ }
if (result == null) {
throw new ClassNotFoundException(name);
More information about the distro-pkg-dev
mailing list