mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
fixed failing tests
This commit is contained in:
@@ -350,6 +350,8 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
|
||||
|
||||
|
||||
public synchronized V putIfAbsent(K key, V value) {
|
||||
if (key == null)
|
||||
throw new NullPointerException();
|
||||
final long sizeLocation = writeEventAnSkip(PUT_IF_ABSENT);
|
||||
final ThreadLocalCopies local = keyValueSerializer.threadLocalCopies();
|
||||
writeKey(key, local);
|
||||
@@ -532,6 +534,8 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
|
||||
|
||||
|
||||
public synchronized V put(K key, V value) {
|
||||
if (key == null)
|
||||
throw new NullPointerException();
|
||||
|
||||
final ThreadLocalCopies local = keyValueSerializer.threadLocalCopies();
|
||||
|
||||
|
||||
@@ -109,8 +109,6 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
|
||||
|
||||
@Override
|
||||
public V put(K key, V value) {
|
||||
if (key == null)
|
||||
throw new NullPointerException();
|
||||
return d.put(key, value);
|
||||
}
|
||||
|
||||
@@ -206,8 +204,6 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
|
||||
|
||||
@Override
|
||||
public V putIfAbsent(K key, V value) {
|
||||
if (key == null)
|
||||
throw new NullPointerException();
|
||||
return d.putIfAbsent(key, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user