[ 
https://issues.apache.org/jira/browse/BVAL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16823382#comment-16823382
 ] 

Romain Manni-Bucau commented on BVAL-173:
-----------------------------------------

Hi John, do you have an accessible code path where it wouldnt be the case? 
AFAIK this code should be safe in bval.

> Unsafe double-checked locking
> -----------------------------
>
>                 Key: BVAL-173
>                 URL: https://issues.apache.org/jira/browse/BVAL-173
>             Project: BVal
>          Issue Type: Bug
>            Reporter: John Myers
>            Priority: Major
>
> 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)

Reply via email to