Hi John,

 --- John McNally <[EMAIL PROTECTED]> wrote: > > 
> Remove the "This class is thread-safe" declaration
> in SequencedHashMap.

When I first read this class through I thought I'd
spotted a race condition in freshenSequence but a
rethink convinced me it was not thread-unsafe. Am I
wrong here? If not, what's the actual location of the
non thread-safe behaviour?

-Janek

    /**
     * Freshens the sequence of the element
<code>value</code> if
     * <code>value</code> is not <code>null</code>.
     *
     * @param key   The key whose sequence to freshen.
     * @param value The value whose existance to check
before removing the old
     *              key sequence.
     */
    protected void freshenSequence(Object key, Object
value)
    {
        if (value != null)
        {
            // Freshening existing element's sequence.
            keySequence.remove(key);
        }
        keySequence.add(key);
    }

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to