From 9001e68bc02a868fa828193e755c1620ea1f1d05 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Mon, 2 Feb 2015 14:58:03 +0000 Subject: [PATCH] fixed latency issues with CheckedBytesStore --- .../net/openhft/chronicle/map/VanillaChronicleMap.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java index 6c0147f99..c03366aa4 100755 --- a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java @@ -232,10 +232,10 @@ class VanillaChronicleMap, final long createMappedStoreAndSegments(BytesStore bytesStore) throws IOException { // checks the the store has not been closed // todo remove the CheckedBytesStore before the release - //this.ms = new CheckedBytesStore(bytesStore); + this.ms = new CheckedBytesStore(bytesStore); - this.ms = bytesStore; + // this.ms = bytesStore; onHeaderCreated(); @@ -533,13 +533,13 @@ class VanillaChronicleMap, } @Override - public final V putIfAbsent( K key, V value) { - if (key == null ) + public final V putIfAbsent(K key, V value) { + if (key == null) throw new NullPointerException(); return put1(key, value, false); } - V put1( K key, V value, boolean replaceIfPresent) { + V put1(K key, V value, boolean replaceIfPresent) { if (key == null) throw new NullPointerException(); checkKey(key);