Thanks! -Janek
--- Michael Smith <[EMAIL PROTECTED]> wrote: > You might be confused which class John was referring > to. The non-thread > safe class is > org.apache.commons.collections.SequencedHashMap. > There > isn't a single synchronized keyword in that entire > file. > > michael > > > -----Original Message----- > > From: Janek Bogucki [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 24, 2002 5:28 PM > > To: Jakarta Commons Developers List > > Subject: SequencedHashMap: This class is > thread-safe (was Re: Silly > > Question) > > > > > > 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]> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ 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]>