roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r356874 - /incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedFeedCacheFilter.java
Date Wed, 14 Dec 2005 21:21:59 GMT
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);
+                }
             }
         }
         



Mime
View raw message