portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r750006 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
Date Wed, 04 Mar 2009 13:45:08 GMT
Author: vkumar
Date: Wed Mar  4 13:45:08 2009
New Revision: 750006

URL: http://svn.apache.org/viewvc?rev=750006&view=rev
Log:
Apply patch for issue https://issues.apache.org/jira/browse/JS2-931
Thanks Joachim Müller for the patch.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java?rev=750006&r1=750005&r2=750006&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
Wed Mar  4 13:45:08 2009
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.container.state.impl;
 
 import java.io.Serializable;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -40,7 +41,7 @@
     {
         private static final long serialVersionUID = -2730733728229116932L;
         
-        public Map<String, PortletWindowBaseNavigationalState> windowStates = new HashMap<String,
PortletWindowBaseNavigationalState>();
+        public Map<String, PortletWindowBaseNavigationalState> windowStates = Collections.synchronizedMap(new
HashMap<String, PortletWindowBaseNavigationalState>());
         public String maximizedWindowId;
     }
     
@@ -80,7 +81,7 @@
             removeFromCache(context, pageState.maximizedWindowId, decorationCache);     
                  
             pageState.maximizedWindowId = null;
         }
-
+        synchronized(pageState.windowStates){
         Iterator<String> iter = requestStates.getWindowIdIterator();
         iter = pageState.windowStates.keySet().iterator();
         String windowId;
@@ -121,7 +122,8 @@
                 }
             }
             
-        }        
+        }      
+        } 
     }
     
     public void sync(RequestContext context, Page page, PortletWindowRequestNavigationalStates
requestStates, JetspeedContentCache cache, JetspeedContentCache decorationCache)    
@@ -232,6 +234,7 @@
         }
         
         // now copy missing requestStates from the pageState
+        synchronized(pageState.windowStates){
         iter = pageState.windowStates.keySet().iterator();
         String windowId;
         while ( iter.hasNext() )
@@ -253,6 +256,7 @@
                     }
                 }
             }
+        }
         }        
     }
     



---------------------------------------------------------------------
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