/hg/icedtea-web: Iteration over launchExceptionChain done by poi...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Wed Jan 30 08:44:18 PST 2013


changeset c6b48ce8f868 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c6b48ce8f868
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Jan 30 17:44:44 2013 +0100

	Iteration over launchExceptionChain done by pointer/get instead by iterator to prevent ConcurrentModificationException.


diffstat:

 ChangeLog                                                                         |  6 ++++++
 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java |  7 +++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r f321ab6fb6c5 -r c6b48ce8f868 ChangeLog
--- a/ChangeLog	Wed Jan 30 16:51:08 2013 +0100
+++ b/ChangeLog	Wed Jan 30 17:44:44 2013 +0100
@@ -1,3 +1,9 @@
+2013-01-30  Jiri Vanek  <jvanek at redhat.com>
+
+	* netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java:
+	Iteration over launchExceptionChain done by pointer/get instead by iterator
+	to prevent ConcurrentModificationException. 
+
 2013-01-30  Jiri Vanek  <jvanek at redhat.com>
 
 	Splashscreen error report made more detailed by stored LaunchErrors
diff -r f321ab6fb6c5 -r c6b48ce8f868 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
--- a/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java	Wed Jan 30 16:51:08 2013 +0100
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java	Wed Jan 30 17:44:44 2013 +0100
@@ -387,10 +387,9 @@
     private static String getChainAsString(List<LaunchException.LaunchExceptionWithStamp> launchExceptionChain, boolean formatTime) {
         String s = "";
         if (launchExceptionChain != null) {
-            int i = 0;
-            for (LaunchException.LaunchExceptionWithStamp launchException : launchExceptionChain) {
-                i++;
-                s = s + i + ") at " + formatTime(launchException.getStamp(), formatTime) + "\n" + getExceptionStackTraceAsString(launchException.getEx());
+            for (int i = 0; i < launchExceptionChain.size(); i++) {
+                LaunchException.LaunchExceptionWithStamp launchException = launchExceptionChain.get(i);
+                s = s + (i+1) + ") at " + formatTime(launchException.getStamp(), formatTime) + "\n" + getExceptionStackTraceAsString(launchException.getEx());
             }
         }
         return s;



More information about the distro-pkg-dev mailing list