portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r451050 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
Date Thu, 28 Sep 2006 22:31:51 GMT
Author: taylor
Date: Thu Sep 28 15:31:50 2006
New Revision: 451050

URL: http://svn.apache.org/viewvc?view=rev&rev=451050
Log:
http://issues.apache.org/jira/browse/JS2-577

PortletWindowAccessorImpl.removeWindows(PortletEntity portletEntity) Doesn't remove Portletwindows
from cache
patch from Ethan Adams

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java?view=diff&rev=451050&r1=451049&r2=451050
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
Thu Sep 28 15:31:50 2006
@@ -15,9 +15,11 @@
  */
 package org.apache.jetspeed.container.window.impl;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
@@ -234,15 +236,20 @@
         return portletWindow;
     }
     
+
     public void removeWindows(PortletEntity portletEntity)
     {
-        Iterator entityWindows = portletEntity.getPortletWindowList().iterator();
-        while(entityWindows.hasNext())
+        List tmpWindows = new ArrayList(windows.entrySet());
+        for(int i = 0; i < tmpWindows.size(); i++)
         {
-            Object obj = entityWindows.next();
-            PortletWindow window = (PortletWindow) obj;
-            removeWindow(window);
-        }
+            PortletWindow window = (PortletWindow)((Map.Entry)tmpWindows.get(i)).getValue();
+            
+
+            if(portletEntity.getId().equals(window.getPortletEntity().getId()))
+            {
+                removeWindow(window);
+            }
+        }        
     }
     
     public void removeWindow(PortletWindow window)



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message