diff options
author | Denis Lila <[email protected]> | 2011-04-05 12:39:14 -0400 |
---|---|---|
committer | Denis Lila <[email protected]> | 2011-04-05 12:39:14 -0400 |
commit | b5b1409c7ab8d77a1f73409d5b3d7a0eacb598af (patch) | |
tree | 631280247922e4e5c1b5b57576f4b35af3891900 /netx/net/sourceforge | |
parent | 8c55999a5dd8968ba23a783b3bcdd904ab6a6460 (diff) |
Fix concurrent access problem to downloadOptions.
Diffstat (limited to 'netx/net/sourceforge')
-rw-r--r-- | netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 7 |
1 files changed, 3 insertions, 4 deletions
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<Resource> queue = new ArrayList<Resource>(); - private static Map<Resource, DownloadOptions> downloadOptions = - new HashMap<Resource, DownloadOptions>(); + private static ConcurrentHashMap<Resource, DownloadOptions> downloadOptions = + new ConcurrentHashMap<Resource, DownloadOptions>(); /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ private static ArrayList<ResourceTracker> active = |