Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-31 Thread Paul Sandoz
On 31 Jul 2015, at 04:47, Stuart Marks stuart.ma...@oracle.com wrote: On 7/28/15 5:50 AM, Paul Sandoz wrote: I agree that if we make a policy decision here, we can change it and the compatibility impact is minimal. Since there already exists an implicit policy governed by like 99.9% of

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-30 Thread Stuart Marks
On 7/28/15 5:50 AM, Paul Sandoz wrote: I agree that if we make a policy decision here, we can change it and the compatibility impact is minimal. Since there already exists an implicit policy governed by like 99.9% of the existing behaviour i do not see the need to be explicit about that

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-28 Thread Paul Sandoz
On 27 Jul 2015, at 20:53, Martin Buchholz marti...@google.com wrote: On Mon, Jul 27, 2015 at 1:19 AM, Paul Sandoz paul.san...@oracle.com wrote: My guiding principle here was that argument validation should not result in side-effects. Thus the state of a collection should remain unchanged

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-27 Thread Fabian Lange
Hi Paul, I'm mildly opposed to this change - I added comments to the bug. It looks like you are not the only one. I am outnumbered :-) The behaviour of ArrayList.remove, and also ArrayList.removeRange, are outliers [*]. It?s also a rather obscure difference behaviour with likely

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-27 Thread Martin Buchholz
On Mon, Jul 27, 2015 at 1:19 AM, Paul Sandoz paul.san...@oracle.com wrote: My guiding principle here was that argument validation should not result in side-effects. Thus the state of a collection should remain unchanged if an exception is thrown due to an invalid argument of an operation.

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-27 Thread Paul Sandoz
On 24 Jul 2015, at 20:30, Martin Buchholz marti...@google.com wrote: Hi Steve, pleased to meet you! (are you a new maintainer of java.util collections?) I suggested that Steve look at some “simple” issues to build up credits for a committer role, so i threw this and some others over the

RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-24 Thread Steve Drach
Hello, Please review the fix for JDK-8114832. I did what was suggested in the comments in the bug report, moving the increment of modcount to the “right” place. https://bugs.openjdk.java.net/browse/JDK-8114832 https://bugs.openjdk.java.net/browse/JDK-8114832

Re: RFR: JDK-8114832 it.next on ArrayList throws wrong type of Exception after remove(-1)

2015-07-24 Thread Martin Buchholz
Hi Steve, pleased to meet you! (are you a new maintainer of java.util collections?) I'm mildly opposed to this change - I added comments to the bug. On Fri, Jul 24, 2015 at 11:16 AM, Steve Drach steve.dr...@oracle.com wrote: Hello, Please review the fix for JDK-8114832. I did what was