commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alp Şehiç <alp.se...@sayyazilim.com>
Subject about LRUMap usage...
Date Mon, 13 Dec 2004 18:54:12 GMT
Hi there,

at the time I'm facing with a problem on the usage of LRUMap, so in the 
code below;

final MapIterator mapIt = map.mapIterator(); // map is a LRUMap instance...
            final TreeMap treeMap = new TreeMap();
            while (mapIt.hasNext())
            {
                if 
(mapIt.next().toString().endsWith("_DEPARTMENT_NAME")) // EXCEPTION IS 
THROWN RIGHT HERE...
                {
                    int temp =
                        Integer.parseInt(
                            mapIt.getKey().toString().substring(0, 4));
                    if (temp >= getFirstNo() && temp <= getLastNo())
                    {
                        treeMap.put(mapIt.getKey(), mapIt.getValue());
                    }
                }
            }

I'm getting :

java.lang.ExceptionInInitializerError: 
java.util.ConcurrentModificationException
    at 
org.apache.commons.collections.map.AbstractLinkedMap$LinkIterator.nextEntry(AbstractLinkedMap.java:555)
    at 
org.apache.commons.collections.map.AbstractLinkedMap$LinkMapIterator.next(AbstractLinkedMap.java:367)
    at Support.initParameters(Support.java:486)
    at Support.<clinit>(Support.java:72)
    at Store..<clinit>(Magaza.java:52)

so is there something wrong with my usage ? 
thanx in advance...



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message