mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-155 change V acquireUsing(@NotNull K key, V usingValue) to included the following
V value = getUsing(key, usingValue);
if (value != null)
return value;
This commit is contained in:
@@ -384,6 +384,10 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
|
||||
@Override
|
||||
public V acquireUsing(@NotNull K key, V usingValue) {
|
||||
V value = getUsing(key, usingValue);
|
||||
|
||||
if (value != null)
|
||||
return value;
|
||||
|
||||
try (WriteContext<K, V> kvContext =
|
||||
lookupUsing(key, usingValue, LockType.WRITE_LOCK, false)) {
|
||||
|
||||
Reference in New Issue
Block a user