Author: knopp
Date: Wed Sep 12 14:50:08 2007
New Revision: 575091

URL: http://svn.apache.org/viewvc?rev=575091&view=rev
Log:
WICKET-942

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java?rev=575091&r1=575090&r2=575091&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java
 Wed Sep 12 14:50:08 2007
@@ -533,13 +533,15 @@
                {
                        rebuildIndices();
                }
-               List indices = (List)idToWindowIndices.get(pageId);
+               List indicesList = (List)idToWindowIndices.get(pageId);
 
-               if (indices != null)
+               if (indicesList != null)
                {
-                       for (Iterator i = indices.iterator(); i.hasNext();)
+                       // we need to make a copy, as the removePage removes 
index from indicesList
+                       Object[] indices = indicesList.toArray();
+                       for (int i = 0; i < indices.length; i++)
                        {
-                               int index = ((Integer)i.next()).intValue();
+                               int index = ((Integer)indices[i]).intValue();
                                PageWindowInternal window = 
(PageWindowInternal)windows.get(index);
                                if (window.pageId == pageId)
                                {


Reply via email to