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)