changeset 1041:7dcaaab8ea51

Fixed download service * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (fillInPartJars) for-each loop replaced by indexed loop to prevent ConcurrentModificationException
author Jiri Vanek <jvanek@redhat.com>
date Mon, 20 Jul 2015 13:00:49 +0200
parents 1204ef8dde15
children a7ed0ba86302
files ChangeLog NEWS netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 25 12:17:56 2015 +0200
+++ b/ChangeLog	Mon Jul 20 13:00:49 2015 +0200
@@ -1,3 +1,9 @@
+2015-07-20  Jiri Vanek  <jvanek@redhat.com>
+
+	Fixed download service
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (fillInPartJars)
+	for-each loop replaced by indexed loop to prevent ConcurrentModificationException
+
 2015-06-25  Jiri Vanek  <jvanek@redhat.com>
 
 	Fixed to short buttons for localized text - RH1231441
--- a/NEWS	Thu Jun 25 12:17:56 2015 +0200
+++ b/NEWS	Mon Jul 20 13:00:49 2015 +0200
@@ -9,6 +9,7 @@
 CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
 
 New in release 1.5.3 (YYYY-MM-DD):
+* fixed DownloadService
 * RH1231441 Unable to read the text of the buttons of the security dialogue
 
 New in release 1.5.2 (2014-11-26):
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Thu Jun 25 12:17:56 2015 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Mon Jul 20 13:00:49 2015 +0200
@@ -1185,8 +1185,9 @@
      * in the same part).
      */
     protected void fillInPartJars(List<JARDesc> jars) {
-        for (JARDesc desc : jars) {
-            String part = desc.getPart();
+        //can not use iterator, will rise ConcurrentModificationException on jars.add(jar);
+        for (int x = 0 ; x< jars.size() ; x++) {
+            String part = jars.get(x).getPart();
 
             // "available" field can be affected by two different threads
             // working in loadClass(String)