RFR: 8001647: In-place methods on Collection/List

Doug Lea dl at cs.oswego.edu
Mon May 6 09:15:58 PDT 2013


On 04/18/13 14:49, Akhil Arora wrote:
> Looks like the stars are aligning on getting on this into TL... the
> refreshed webrev is -
>
> http://cr.openjdk.java.net/~akhil/8001647.8/webrev/
>

Sorry for the delay on this. I just committed jsr166 repo
version of CopyOnWriteArray{List,Set} that (among unrelated
changes) had different versions of some of these.
Before committing, I browsed through your webrev.
They appear to be functionally equivalent. However,
I had not included versions of overrides for in-place
updates in CopyOnWriteArrayList.SubList.
We don't override any bulk in-place update operations
(addAll, etc) in sub-lists (relying on slow defaults)
and discourage their use because they force a full
array copy/update even when applied to small sublists, which
will be arbitrarily slow even if "optimized".
I don't see why replace, removeIf, or sort should
be different.

-Doug





More information about the lambda-dev mailing list