RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-08 Thread Patrick Zhang OS
level javadoc for modCount, or for "fail fast". Regards Patrick -Original Message- From: Stuart Marks Sent: Thursday, May 9, 2019 5:01 AM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called con

Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-08 Thread Stuart Marks
On 5/4/19 12:21 AM, Patrick Zhang OS wrote: Thank you very much for the detailed explanation and examples, which solved most of my previous questions and confusion. Really appreciate that. I agree with the opinion about "effort vs benefit". Re-thought my original tests concerning CMEs that

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-04 Thread Patrick Zhang OS
, 2019 8:39 AM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently >> ...merely to serve as a discussion point about the policy for >> throwing ConcurrentModificationException? >

Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-01 Thread Stuart Marks
...merely to serve as a discussion point about the policy for throwing ConcurrentModificationException? Yes, for the time being, I want to see and welcome more ideas on this. It seems to me that the policy for throwing CME here is not a unified one, mostly based on experience and testing. C

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-24 Thread Patrick Zhang OS
--Original Message- > From: Stuart Marks > Sent: Saturday, April 13, 2019 4:15 AM > To: Patrick Zhang OS > Cc: core-libs-dev > Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an > empty Map if clear() called concurrently > > [I'm about to leav

Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-24 Thread Stuart Marks
compute()/computeIfAbsent(). Centainly I know it has to afford the risk of missing bugs. Regards Patrick -Original Message- From: Stuart Marks Sent: Saturday, April 13, 2019 4:15 AM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CM

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-15 Thread Patrick Zhang OS
OS Cc: core-libs-dev Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently [I'm about to leave for a week's vacation, so I won't be able to respond further until after I return] Hi Patrick, A bit of background about m

Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-12 Thread Stuart Marks
[I'm about to leave for a week's vacation, so I won't be able to respond further until after I return] Hi Patrick, A bit of background about my thinking on this proposal. The Collections Framework has a set of weird edge cases ("tricky", as you say) that I'll describe as "state-dependent" beh

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-12 Thread Patrick Zhang OS
Created a ticket to track it, welcome any comments. Thanks. JBS https://bugs.openjdk.java.net/browse/JDK-8222394 Webrev: http://cr.openjdk.java.net/~qpzhang/map.clear/webrev.01 Regards Patrick -Original Message- From: core-libs-dev On Behalf Of Patrick Zhang OS Sent: Saturday, March