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
