hamnis/httpcache4j — Issue #8: CME in InvalidateOnRemoveLRUHashMap
Author: mogsie
Created: 2012-01-31 10:49:06+00:00
State: open

I got this today...

java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
at java.util.HashMap.putAllForCreate(HashMap.java:435)
at java.util.HashMap.(HashMap.java:225)
at java.util.LinkedHashMap.(LinkedHashMap.java:195)
at org.codehaus.httpcache4j.util.InvalidateOnRemoveLRUHashMap.(InvalidateOnRemoveLRUHashMap.java:21)
at org.codehaus.httpcache4j.util.InvalidateOnRemoveLRUHashMap.copy(InvalidateOnRemoveLRUHashMap.java:27)
at org.codehaus.httpcache4j.cache.PersistentCacheStorage.saveCacheToDisk(PersistentCacheStorage.java:138)
at org.codehaus.httpcache4j.cache.PersistentCacheStorage.putImpl(PersistentCacheStorage.java:93)
at org.codehaus.httpcache4j.cache.MemoryCacheStorage.update(MemoryCacheStorage.java:100)
at org.codehaus.httpcache4j.cache.HTTPCache.updateHeadersFromResolved(HTTPCache.java:250)
at org.codehaus.httpcache4j.cache.HTTPCache.handleResolve(HTTPCache.java:222)
at org.codehaus.httpcache4j.cache.HTTPCache.handleStaleResponse(HTTPCache.java:171)
at org.codehaus.httpcache4j.cache.HTTPCache.getFromStorage(HTTPCache.java:157)
at org.codehaus.httpcache4j.cache.HTTPCache.doRequest(HTTPCache.java:142)
at org.codehaus.httpcache4j.cache.HTTPCache.execute(HTTPCache.java:120)
at org.codehaus.httpcache4j.cache.HTTPCache.doCachedRequest(HTTPCache.java:101)

Maybe InvalidateOnRemove should simply be CopyOnWrite?