From b5b1409c7ab8d77a1f73409d5b3d7a0eacb598af Mon Sep 17 00:00:00 2001 From: Denis Lila Date: Tue, 5 Apr 2011 12:39:14 -0400 Subject: Fix concurrent access problem to downloadOptions. --- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'netx/net/sourceforge/jnlp') diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java index 4ef0e0d..c42cc99 100644 --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java @@ -29,9 +29,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.jar.JarOutputStream; import java.util.jar.Pack200; import java.util.jar.Pack200.Unpacker; @@ -120,8 +119,8 @@ public class ResourceTracker { /** resources requested to be downloaded */ private static ArrayList queue = new ArrayList(); - private static Map downloadOptions = - new HashMap(); + private static ConcurrentHashMap downloadOptions = + new ConcurrentHashMap(); /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ private static ArrayList active = -- cgit v1.2.3