Skip to content

Is CacheItem Iterator working as expected? #39

Description

@cflewis

In Cache.java, there's this bit of code:

// used in file distribution output
@Override
public Iterator<CacheItem> iterator() {
    return cacheTable.values().iterator();
}

This will return the contents of cacheTable, but my understanding is that the contents of cacheTable does not necessarily reflect the contents of the cache. Shouldn't the items be checked for isInCache before they are returned?

If not, is this iterator safe to use if I want to output the contents of the cache at the end of the simulation?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions