cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r171201 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
Date Sat, 21 May 2005 07:49:16 GMT
Author: lgawron
Date: Sat May 21 00:49:15 2005
New Revision: 171201

URL: http://svn.apache.org/viewcvs?rev=171201&view=rev
Log:
avoid ConcurrentModificationException

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java?rev=171201&r1=171200&r2=171201&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
Sat May 21 00:49:15 2005
@@ -482,10 +482,13 @@
      */
     private void invalidateContinuations(
             WebContinuationsHolder continuationsHolder) {
-        Set continuationIds = continuationsHolder.getContinuationIds();
-        Iterator idsIter = continuationIds.iterator();
-        while (idsIter.hasNext()) {
-            WebContinuation wk = continuationsHolder.get(idsIter.next());
+        // TODO: this avoids ConcurrentModificationException, still this is not
+        // the best solution and should be changed
+        Object[] continuationIds = continuationsHolder.getContinuationIds()
+                .toArray();
+        
+        for (int i = 0; i < continuationIds.length; i++) {
+            WebContinuation wk = continuationsHolder.get(continuationIds[i]);
             if (wk != null) {
                 _detach(wk);
                 _invalidate(continuationsHolder, wk);



Mime
View raw message