[jboss-svn-commits] JBoss Common SVN: r4868 - common-core/trunk/src/main/java/org/jboss/util/collection.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Oct 19 15:37:21 EDT 2010
Author: jason.greene at jboss.com
Date: 2010-10-19 15:37:20 -0400 (Tue, 19 Oct 2010)
New Revision: 4868
Modified:
common-core/trunk/src/main/java/org/jboss/util/collection/ConcurrentReferenceHashMap.java
Log:
Fix rare condition in putIfAbsent
Modified: common-core/trunk/src/main/java/org/jboss/util/collection/ConcurrentReferenceHashMap.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/ConcurrentReferenceHashMap.java 2010-10-19 12:56:14 UTC (rev 4867)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/ConcurrentReferenceHashMap.java 2010-10-19 19:37:20 UTC (rev 4868)
@@ -672,7 +672,7 @@
V oldValue;
if (e != null) {
oldValue = e.value();
- if (!onlyIfAbsent)
+ if (!onlyIfAbsent || oldValue == null) // null = gc AFTER stale removal
e.setValue(value, valueType, refQueue);
}
else {
More information about the jboss-svn-commits
mailing list