HCOLL-81 Update tests for lambdas in Java 8.

This commit is contained in:
Peter Lawrey
2014-11-15 13:43:54 +00:00
parent 3750bc4f8e
commit 30a2eb78fb
3 changed files with 27 additions and 5 deletions
@@ -367,9 +367,9 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
@Override
public <R> R mapForKey(K key, @NotNull Function<? super V, R> function) {
try (Context<K, V> entry = lookupUsing(key, null,
try (ReadContext<K, V> entry = lookupUsing(key, null,
LockType.READ_LOCK, false)) {
return function.apply(entry.value());
return entry.present() ? function.apply(entry.value()) : null;
}
}