commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r907376 - /commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java
Date Sun, 07 Feb 2010 03:43:02 GMT
Author: mbenson
Date: Sun Feb  7 03:43:02 2010
New Revision: 907376

URL: http://svn.apache.org/viewvc?rev=907376&view=rev
Log:
merge double-read of ThreadLocal from trunk

Modified:
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java?rev=907376&r1=907375&r2=907376&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/HashCodeBuilder.java
Sun Feb  7 03:43:02 2010
@@ -541,7 +541,9 @@
         if (registry != null) {
             registry.remove(new IDKey(value));
             synchronized (HashCodeBuilder.class) {
-                if (registry.isEmpty()) {
+                //read again
+                registry = getRegistry();
+                if (registry != null && registry.isEmpty()) {
                     REGISTRY.set(null);
                 }
             }



Mime
View raw message