Revert Clear computable when value is calculated in LockBasedStorageManager
Relates to #KT-35256
This commit is contained in:
@@ -305,10 +305,7 @@ public class LockBasedStorageManager implements StorageManager {
|
|||||||
|
|
||||||
private static class LockBasedLazyValue<T> implements NullableLazyValue<T> {
|
private static class LockBasedLazyValue<T> implements NullableLazyValue<T> {
|
||||||
private final LockBasedStorageManager storageManager;
|
private final LockBasedStorageManager storageManager;
|
||||||
/**
|
private final Function0<? extends T> computable;
|
||||||
* Computable function is <code>null</code> when value has been calculated
|
|
||||||
*/
|
|
||||||
private Function0<? extends T> computable;
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private volatile Object value = NotValue.NOT_COMPUTED;
|
private volatile Object value = NotValue.NOT_COMPUTED;
|
||||||
@@ -362,7 +359,6 @@ public class LockBasedStorageManager implements StorageManager {
|
|||||||
postCompute(typedValue);
|
postCompute(typedValue);
|
||||||
|
|
||||||
value = typedValue;
|
value = typedValue;
|
||||||
computable = null;
|
|
||||||
return typedValue;
|
return typedValue;
|
||||||
}
|
}
|
||||||
catch (Throwable throwable) {
|
catch (Throwable throwable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user