RFR: 8005051: optimized defaults for Iterator.forEachRemaining

Alan Bateman Alan.Bateman at oracle.com
Wed Apr 24 13:19:03 UTC 2013

On 23/04/2013 20:18, Akhil Arora wrote:
> On 04/22/2013 11:42 AM, Alan Bateman wrote:
>> One thing I meant to ask when forEachRemaining was added was whether it
>> should say anything about the "last element"? I see in the webrev that
>> you've set it for the ArrayList iterators but not the LinkedList
>> iterator - should it?
> done, and added more tests for the state of the iterator after 
> forEachRemaining returns
> http://cr.openjdk.java.net/~akhil/8005051.2/webrev/
> (a portion of version 1 of the webrev has already been pushed to TL as 
> part of rev 6973 http://hg.openjdk.java.net/jdk8/tl/jdk/rev/98a7bb7baa76)
The remaining changes in the webrev looks okay to me. Also good to have 
the test expanded.

So do you think that the javadoc should say anything about the 
relationship between forEachRemaining and remove?


More information about the core-libs-dev mailing list