frjaeger220 / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Clean up @SuppressWarnings("DoubleCheckedLocking") #250

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
You should probably replace this code using the Initialization On Demand
Holder idiom mentioned here:
http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#dcl

Original issue reported on code.google.com by gili.tza...@gmail.com on 24 Sep 2008 at 3:39

GoogleCodeExporter commented 9 years ago
DCL is safe as of Java 5, and IODH only works for statics.

Original comment by crazybob...@gmail.com on 24 Sep 2008 at 3:47

GoogleCodeExporter commented 9 years ago
Good point about the static, I missed that.

Original comment by gili.tza...@gmail.com on 24 Sep 2008 at 3:52