jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil Pandit" <spand...@csc.com>
Subject Possible defect while removing an element from the Cache
Date Wed, 26 Mar 2003 22:14:32 GMT

Is this a defect ?

This is in remove(Serializable key) method in LRUMemoryCache .

If the key passed to this remove method is an instance of GroupID ,  the
code iterates through the entry set of the map. For each entry in the entry
set if the key matches then it removes the entry from the map. However the
code also calls removeNode method after this passing entry.Value. Since
this entry is already removed from map , the value passed to removeNode
method is null and hence throws a NullPointerException.


View raw message