RFR 8162106 Remove VarHandle.addAndGet

Claes Redestad claes.redestad at oracle.com
Wed Aug 10 15:27:13 UTC 2016



On 2016-08-10 17:29, Aleksey Shipilev wrote:
> On 08/10/2016 05:37 PM, Paul Sandoz wrote:
>> Please review the following webrev which removes
>> VarHandle.addAndGet:
>>
>> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8162106-vhs-rm-addAndGet/webrev/
> The removal looks good. +1 from me.
>
>> The previous incarnation of those tests was awkwardly designed to
>> test a combination of getAndAdd and addAndGet rather than test
>> specifically for overflow. With the removal of addAndGet i simplified
>> it to be the same as the acquire/release variants.
> Yes, and the overflow tests should really be more complex anyway: e.g.
> for sub-long getAndAdd we should check that we did not accidentally
> overflow into the adjacent element.

Good point. Is there an RFE for this?

/Claes


More information about the core-libs-dev mailing list