• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009


The javadoc for RMICachePeer.getElements states the following:

“@return a list of Elements. If an element was not found or null, it will not be in the list.”

However, the code does this:

    if (keys == null) {
        return new ArrayList();
    List elements = new ArrayList();
    for (int i = 0; i < keys.size(); i++) {
        Serializable key = (Serializable) keys.get(i);
        Element element = cache.getQuiet(key);
    return elements;

Hence because getQuiet can return null (e.g. for expired elements), the getElements method can return a List containing nulls. Should be a trivial fix if the javadoc reflects the current intention… although it would be worth considering whether the RMIBootstrapCacheLoader should be fetching keys for expired elements in the first place, since I don’t think it has a means of fetching such elements anyway, nor a use for them.


Ben Sourceforge Ticket ID: 1703340 - Opened By: ben_piper - 19 Apr 2007 00:22 UTC


Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira