You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/12/14 22:21:59 UTC

svn commit: r356874 - /incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java

Author: agilliland
Date: Wed Dec 14 13:21:56 2005
New Revision: 356874

URL: http://svn.apache.org/viewcvs?rev=356874&view=rev
Log:
missed a synchronization block.


Modified:
    incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java

Modified: incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java?rev=356874&r1=356873&r2=356874&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java Wed Dec 14 13:21:56 2005
@@ -218,16 +218,19 @@
         // TODO: it would be nice to be able to do this without iterating 
         //       over the entire cache key set
         String key = null;
-        Iterator allKeys = this.mCache.keySet().iterator();
-        while(allKeys.hasNext()) {
-            key = (String) allKeys.next();
-            
-            if(key.startsWith("ifmod:main")) {
-                removeSet.add(key);
-            } else if(key.startsWith("ifmod:planet")) {
-                removeSet.add(key);
-            } else if(key.startsWith("ifmod:weblog/"+website.getHandle())) {
-                removeSet.add(key);
+        
+        synchronized(mCache) {
+            Iterator allKeys = this.mCache.keySet().iterator();
+            while(allKeys.hasNext()) {
+                key = (String) allKeys.next();
+                
+                if(key.startsWith("ifmod:main")) {
+                    removeSet.add(key);
+                } else if(key.startsWith("ifmod:planet")) {
+                    removeSet.add(key);
+                } else if(key.startsWith("ifmod:weblog/"+website.getHandle())) {
+                    removeSet.add(key);
+                }
             }
         }