commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r907129 - in /commons/proper/lang/branches/LANG_2_X/src: main/java/org/apache/commons/lang/builder/ToStringStyle.java test/java/org/apache/commons/lang/builder/ToStringBuilderTest.java
Date Sat, 06 Feb 2010 02:59:32 GMT
On 05/02/2010, mbenson@apache.org <mbenson@apache.org> wrote:
> Author: mbenson
>  Date: Fri Feb  5 23:18:32 2010
>  New Revision: 907129
>
>  URL: http://svn.apache.org/viewvc?rev=907129&view=rev
>  Log:
>  [LANG-586] merge
>
>  Modified:
>     commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/ToStringStyle.java
>     commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/builder/ToStringBuilderTest.java
>
>  Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/ToStringStyle.java
>  URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/ToStringStyle.java?rev=907129&r1=907128&r2=907129&view=diff
>  ==============================================================================
>  --- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/ToStringStyle.java
(original)
>  +++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/ToStringStyle.java
Fri Feb  5 23:18:32 2010

...

>  @@ -187,33 +186,41 @@
>       * <p>
>       * Unregisters the given object.
>       * </p>
>  -     *
>  +     *
>       * <p>
>       * Used by the reflection methods to avoid infinite loops.
>       * </p>
>  -     *
>  +     *
>       * @param value
>       *                  The object to unregister.
>       */
>      static void unregister(Object value) {
>  -        getRegistry().remove(value);
>  +        if (value != null) {
>  +            Map m = getRegistry();
>  +            if (m != null) {
>  +                m.remove(value);
>  +                if (m.isEmpty()) {
>  +                    REGISTRY.remove();

ThreadLocal.remove() requires Java 1.5+

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message