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

2013-04-21 Thread Akhil Arora
On 04/21/2013 04:33 AM, Alan Bateman wrote: On 20/04/2013 02:39, Akhil Arora wrote: On 04/19/2013 04:15 AM, Alan Bateman wrote: On 18/04/2013 19: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/8

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

2013-04-21 Thread Alan Bateman
On 20/04/2013 02:39, Akhil Arora wrote: On 04/19/2013 04:15 AM, Alan Bateman wrote: On 18/04/2013 19: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/ A minor comment on Collect

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

2013-04-19 Thread Akhil Arora
On 04/19/2013 05:42 AM, David Holmes wrote: On 19/04/2013 10:14 PM, Paul Sandoz wrote: On Apr 19, 2013, at 1:15 PM, Alan Bateman wrote: On 18/04/2013 19:49, Akhil Arora wrote: Looks like the stars are aligning on getting on this into TL... the refreshed webrev is - http://cr.openjdk.java.n

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

2013-04-19 Thread Akhil Arora
On 04/19/2013 04:15 AM, Alan Bateman wrote: On 18/04/2013 19: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/ A minor comment on Collection.removeIf is "that satisifies the give

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

2013-04-19 Thread Akhil Arora
On 04/18/2013 12:36 PM, Mike Duigou wrote: Hi Akhil; List.sort:: - @since tag is in a strange location. - The (optional) on IAE is in a strange position and not linked like the others. fixed both AbstractList:: - Should we consider adding overrides for default methods here even if our im

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

2013-04-19 Thread Akhil Arora
Updated with feedback so far - http://cr.openjdk.java.net/~akhil/8001647.9/webrev/ On 04/18/2013 11:49 AM, 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/ Please review Thanks On

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

2013-04-19 Thread Paul Sandoz
On Apr 19, 2013, at 2:42 PM, David Holmes wrote: > On 19/04/2013 10:14 PM, Paul Sandoz wrote: >> >> On Apr 19, 2013, at 1:15 PM, Alan Bateman wrote: >> >>> On 18/04/2013 19:49, Akhil Arora wrote: Looks like the stars are aligning on getting on this into TL... the refreshed webrev is

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

2013-04-19 Thread Paul Sandoz
On Apr 19, 2013, at 2:29 PM, David Holmes wrote: > Hi Akhil, > > This is only a partial review so far. > > I have some issues with the ConcurrentModificationException strategy. > > Taking ArrayList, the basic idea is that you want to detect > modifications that are concurrent with iteration

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

2013-04-19 Thread David Holmes
On 19/04/2013 10:14 PM, Paul Sandoz wrote: On Apr 19, 2013, at 1:15 PM, Alan Bateman wrote: On 18/04/2013 19: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/ A minor comment

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

2013-04-19 Thread Alan Bateman
On 19/04/2013 13:14, Paul Sandoz wrote: : The function value could structurally modify the Vector instance. Ah yes, got it - thanks. For removeIf then I assume it isn't required in the pass over the removeSet. -Alan.

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

2013-04-19 Thread David Holmes
Hi Akhil, This is only a partial review so far. I have some issues with the ConcurrentModificationException strategy. Taking ArrayList, the basic idea is that you want to detect modifications that are concurrent with iteration - so the mutators up the modCount and the iterator functions check

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

2013-04-19 Thread Paul Sandoz
On Apr 19, 2013, at 1:15 PM, Alan Bateman wrote: > On 18/04/2013 19: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/ >> > A minor comment on Collection.removeIf is "t

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

2013-04-19 Thread Alan Bateman
On 18/04/2013 19: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/ A minor comment on Collection.removeIf is "that satisifies the given predicate" might be better than "which matc

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

2013-04-18 Thread Mike Duigou
Hi Akhil; List.sort:: - @since tag is in a strange location. - The (optional) on IAE is in a strange position and not linked like the others. AbstractList:: - Should we consider adding overrides for default methods here even if our impls wouldn't use them? We could at least add modCount che

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

2013-04-18 Thread Akhil Arora
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/ Please review Thanks On 12/10/2012 09:31 PM, Akhil Arora wrote: http://cr.openjdk.java.net/~akhil/8001647.3/webrev/ - now with synchronized and unmod

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

2012-12-11 Thread Alan Bateman
On 10/12/2012 21:59, Mike Duigou wrote: : Adding "public" was at my suggestion. It seems inconsistent to me to have it on the default methods. Perhaps this has been discussed before, in which case ignore this. BTW: The only reason I'm bringing this up is because there are lots of default met

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

2012-12-11 Thread David Holmes
On 11/12/2012 7:59 AM, Mike Duigou wrote: On Dec 10 2012, at 05:28 , Alan Bateman wrote: On 08/12/2012 01:42, Akhil Arora wrote: As part of the Library Lambdafication, this patch adds the following default methods to Collections - This may be bikeshed territory but we usually don't use the

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

2012-12-10 Thread Akhil Arora
http://cr.openjdk.java.net/~akhil/8001647.3/webrev/ - now with synchronized and unmodifiable wrappers in Collections.java for the default methods being added On 12/10/2012 01:48 PM, Akhil Arora wrote: Updated with yours and Alan's comments - http://cr.openjdk.java.net/~akhil/8001647.2/webrev

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

2012-12-10 Thread Mike Duigou
On Dec 10 2012, at 05:28 , Alan Bateman wrote: > On 08/12/2012 01:42, Akhil Arora wrote: >> As part of the Library Lambdafication, this patch adds the following >> default methods to Collections - >> > This may be bikeshed territory but we usually don't use the "public" modifier > on methods de

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

2012-12-10 Thread Akhil Arora
Updated with yours and Alan's comments - http://cr.openjdk.java.net/~akhil/8001647.2/webrev/ - removed null check for removeSet - cache this.size in removeAll, replaceAll (for ArrayList, Vector and CopyOnWriteArrayList) - calculate removeCount instead of BitCount.cardinality() - removed unnece

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

2012-12-10 Thread Alan Bateman
On 08/12/2012 01:42, Akhil Arora wrote: As part of the Library Lambdafication, this patch adds the following default methods to Collections - Iterable.forEach(Block) Collection.removeAll(Predicate) List.sort(Comparator) List.replaceAll(UnaryOperator) It also provides more efficient implementati

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

2012-12-08 Thread Peter Levart
On 12/08/2012 02:42 AM, Akhil Arora wrote: As part of the Library Lambdafication, this patch adds the following default methods to Collections - Iterable.forEach(Block) Collection.removeAll(Predicate) List.sort(Comparator) List.replaceAll(UnaryOperator) It also provides more efficient implemen