Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.1, 4.2
-
None
-
None
Description
Removing the final element(s) in a MultiSet doesn't set the count on a MultiSet.Entry to zero.
protected int getCountAfterRemoval(MultiSet<String> multiset) { MultiSet.Entry<String> entry = multiset.entrySet().iterator().next(); entry.getCount(); // = 2 multiset.remove(entry.getElement()); entry.getCount(); // = 1 multiset.remove(entry.getElement()); return entry.getCount(); // Still = 1, should be 0 }
Attachments
Issue Links
- links to