RFR 8024709 : TreeMap.DescendingKeyIterator 'remove' confuses iterator position
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 9 10:12:00 UTC 2013
On 08/10/2013 20:55, Brent Christian wrote:
> I've beefed up the test case, as suggested by Alan and Paul. It tries
> removing at the start, middle, and end of the iteration.
>
> FWIW, all but one of the test scenarios pass even without the fix.
> The failing case is:
>
> checkDescItrRmMid(m.keySet(), m.navigableKeySet().descendingIterator());
>
> (that is, remove an element from the middle of the iteration, the
> specific case of this bug).
>
> So most of the new tests are of code that is already correct, but IMO
> it doesn't hurt to make sure it stays correct. :)
>
> http://cr.openjdk.java.net/~bchristi/8024709/webrev.01/
Thanks for the update and expanding the test. I skimmed over the new
test cases and they looks good. There are a few commented out cases and
it's not clear why this also. Also a minor observation is that the
method names are a bit inconsistent with the other method names in the
test, they might be something to look at before pushing.
-Alan
More information about the core-libs-dev
mailing list