updating containsKey method in PassiveExpiringMap#53
Conversation
correcting the containsKey method to remove all expired entries to match the class and method javadoc statements
garydgregory
left a comment
There was a problem hiding this comment.
Please provide a unit test that fails without this patch. Thank you!
…pass with the new changes
|
are there additional problems with this change, or can it be merged in? |
kinow
left a comment
There was a problem hiding this comment.
The change looks OK now I think, with a test. Before being merged, it would require a JIRA ticket as well, to be included in changes.xml.
I had a look at the code in PassiveExpiringMap, and the same removeIfExpired(key, now()) is used in other three methods. The javadocs do not clarify if the key argument is supposed to be used and clear only the expired values with that key, or not.
So for me the options here are to leave as-is and clarify in the Javadoc documentation what is cleared. Otherwise, to modify all methods to match the current javadocs and to expireAll instead.
|
I am waiting for the comments from @kinow to be resolved, by @thePatmanMI or another. |
correcting the containsKey method to remove all expired entries to match the class and method javadoc statements