commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: [collections] LRUMap Problem ConcurrentModificationException
Date Wed, 17 Jun 2009 09:33:18 GMT
Hi Renè,

Renè Glanzer wrote at Mittwoch, 17. Juni 2009 09:47:

> OK so my search will continue :-)
> Meanwhile I'll consider to change my implementation, which i'd like to
> prevent.

I've reopened COLLECTIONS-3, since I was able to write a unit test that
reproduces the problem.

> Maybe somebody of you knows a time and size based cache system where i can
> map a key to an object?

My enhancement of the unit test for the LRUMap shows, that the
ConcurrentModificationException only happens, if you use an iterator form
the keySet. So you should simply use the entrySet in your code and you'll
be fine.

- Jörg


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


Mime
View raw message