commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <>
Subject SequencedHashMap: This class is thread-safe (was Re: Silly Question)
Date Thu, 24 Jan 2002 22:28:29 GMT
Hi John,

 --- John McNally <> 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?


     * 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
        if (value != null)
            // Freshening existing element's sequence.

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message