Description
The documentation for PassiveExpiringMap says:
When invoking methods that involve accessing the entire map contents (i.e containsKey(Object), entrySet(), etc.) this decorator removes all expired entries prior to actually completing the invocation.
Checked the code for containsKey and it doesn't seem to access the entire map, only the element of the key. If not sure about this, please check the attached show_effect_of_containsKey_containsValue_on_expiration.diff as a proof.
Suggestion is to replace the example with containsValue(Object) or size() or something that does remove all expired entries prior to actually completing the invocation:
When invoking methods that involve accessing the entire map contents (i.e containsValue(Object), entrySet(), etc.) this decorator removes all expired entries prior to actually completing the invocation.
Potential fix patch: fix_doc.diff