commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r907126 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
Date Fri, 05 Feb 2010 23:11:43 GMT
Author: mbenson
Date: Fri Feb  5 23:11:43 2010
New Revision: 907126

URL: http://svn.apache.org/viewvc?rev=907126&view=rev
Log:
promote uniformity between branches by using registry accessor

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java?rev=907126&r1=907125&r2=907126&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
Fri Feb  5 23:11:43 2010
@@ -173,12 +173,11 @@
      */
     static void register(Object value) {
         if (value != null) {
-            WeakHashMap<Object, Object> m = REGISTRY.get();
+            Map<Object, Object> m = getRegistry();
             if (m == null) {
-                m = new WeakHashMap<Object, Object>();
-                REGISTRY.set(m);
+                REGISTRY.set(new WeakHashMap<Object, Object>());
             }
-            m.put(value, null);
+            getRegistry().put(value, null);
         }
     }
 
@@ -196,7 +195,7 @@
      */
     static void unregister(Object value) {
         if (value != null) {
-            WeakHashMap<Object, Object> m = REGISTRY.get();
+            Map<Object, Object> m = getRegistry();
             if (m != null) {
                 m.remove(value);
                 if (m.isEmpty()) {



Mime
View raw message