Double-checked locking implementation fixed

This commit is contained in:
Andrey Breslav
2013-02-08 17:13:06 +04:00
parent c595d95ee0
commit 0cf272eda7
@@ -81,8 +81,8 @@ public class LockBasedStorageManager implements StorageManager {
synchronized (lock) { synchronized (lock) {
_value = value; _value = value;
if (_value == null) { if (_value == null) {
value = computable.compute(); _value = computable.compute();
_value = value; value = _value;
} }
return _value; return _value;
} }