Fall-through case removed

This commit is contained in:
Andrey Breslav
2013-10-02 15:12:53 +04:00
parent 41a73645c6
commit eb20d358b0
2 changed files with 4 additions and 9 deletions
@@ -188,12 +188,7 @@ public class LockBasedStorageManager implements StorageManager {
_value = value; _value = value;
if (!(_value instanceof NotValue)) return WrappedValues.unescapeThrowable(_value); if (!(_value instanceof NotValue)) return WrappedValues.unescapeThrowable(_value);
if (_value == NotValue.COMPUTING) { if (_value == NotValue.COMPUTING) return WrappedValues.unescapeThrowable(recursionDetected());
Object result = recursionDetected();
if (result != NotValue.NOT_COMPUTED) {
return WrappedValues.unescapeThrowable(result);
}
}
value = NotValue.COMPUTING; value = NotValue.COMPUTING;
try { try {
@@ -213,7 +208,7 @@ public class LockBasedStorageManager implements StorageManager {
} }
/** /**
* @return {@code NOT_COMPUTED} to proceed, a value or wrapped exception otherwise, see WrappedValues * @return a value or wrapped exception, see WrappedValues
* @throws DO NOT throw exceptions from implementations of this method, instead return WrappedValues.escapeThrowable(exception) * @throws DO NOT throw exceptions from implementations of this method, instead return WrappedValues.escapeThrowable(exception)
*/ */
@Nullable @Nullable
@@ -46,8 +46,8 @@ public interface StorageManager {
* @param onRecursiveCall is called if the computation calls itself recursively. * @param onRecursiveCall is called if the computation calls itself recursively.
* If this parameter is null, an exception will be thrown on a recursive call, * If this parameter is null, an exception will be thrown on a recursive call,
* otherwise it should return a result of WrappedValues.escapeThrowable() method * otherwise it should return a result of WrappedValues.escapeThrowable() method
* @param postCompute is called after the value is computed, but before any other thread sees it (the current thread may * @param postCompute is called after the value is computed, but before any other thread sees it
* see it in between) * (the current thread may see it in between)
*/ */
@NotNull @NotNull
<T> NotNullLazyValue<T> createLazyValueWithPostCompute( <T> NotNullLazyValue<T> createLazyValueWithPostCompute(