You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2004/11/16 08:33:12 UTC
cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/engine/memory/lru LRUMemoryCache.java
asmuts 2004/11/15 23:33:11
Modified: src/java/org/apache/jcs/engine/memory/lru
LRUMemoryCache.java
Log:
Moved removal in update into synchronized block. This solved the periodic map != list error.
Revision Changes Path
1.27 +8 -9 jakarta-turbine-jcs/src/java/org/apache/jcs/engine/memory/lru/LRUMemoryCache.java
Index: LRUMemoryCache.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/memory/lru/LRUMemoryCache.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- LRUMemoryCache.java 13 Jul 2004 02:11:45 -0000 1.26
+++ LRUMemoryCache.java 16 Nov 2004 07:33:11 -0000 1.27
@@ -96,14 +96,13 @@
getFirst()).ce.getKey(),
(MemoryElementDescriptor) list.
getFirst());
- }
-
- // If the node was the same as an existing node, remove it.
- if (old != null &&
- ( (MemoryElementDescriptor) list.getFirst()).ce.getKey().
- equals(old.ce.getKey()))
- {
- list.remove(old);
+ // If the node was the same as an existing node, remove it.
+ if (old != null &&
+ ( (MemoryElementDescriptor) list.getFirst()).ce.getKey().
+ equals(old.ce.getKey()))
+ {
+ list.remove(old);
+ }
}
int size = map.size();
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org