Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.8-rc-4
-
Fix Version/s: 1.8.0, 1.9-beta-1
-
Component/s: Compiler
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
@Singleton(lazy=true) does not perform the correct double checked locking for Java
It does the naive version where no local variable is declared.
More info here: http://groovy.329449.n5.nabble.com/Singleton-double-checked-locking-fix-td4302467.html
I have a patch that I will commit.
This is not a defect. The singleton instance is declared volatile, which means it operators correctly. All fixed, no problems.