RFR: 8162563: Fix double checked locking in System.console()
David Holmes
david.holmes at oracle.com
Wed Jul 27 02:31:11 UTC 2016
On 27/07/2016 6:35 AM, Martin Buchholz wrote:
> Hi Xueming,
>
> I'd like you to do a wee code review,
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/Console-double-checked-locking/
Humour me - where is the bug? We're simply retrieving the existing
Console singleton that is safely published through static
initialization. All this seems to do is improve the performance if a
race occurs.
AFAICS the use of locking here isn't necessary at all.
Cheers,
David
More information about the core-libs-dev
mailing list