You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bval.apache.org by "John Myers (JIRA)" <ji...@apache.org> on 2019/04/22 19:32:00 UTC
[jira] [Created] (BVAL-173) Unsafe double-checked locking
John Myers created BVAL-173:
-------------------------------
Summary: Unsafe double-checked locking
Key: BVAL-173
URL: https://issues.apache.org/jira/browse/BVAL-173
Project: BVal
Issue Type: Bug
Reporter: John Myers
The methods org.apache.bval.util.Lazy.get() and org.apache.bval.util.LazyInt.getAsInt() both use unsafe double-checked locking. In both cases, the fact that init is volatile does not, under the Java Memory Model, prevent an incompletely initialized value from being returned from the function.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)