Refactor: Use putIfAbsent() to show the intention more clearly

Change-Id: I2fad1709cc6f8827d382a07b55cd89d2814ede36
diff --git a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
index 386d9dd..4d9e3cb 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
@@ -292,9 +292,8 @@
      * @return true if the operation succeeds, false otherwise.
      */
     private <K, V> boolean appendValues(TransactionalMap<K, List<V>> map, K key, List<V> values) {
-        List<V> oldValues = map.get(key);
+        List<V> oldValues = map.putIfAbsent(key, new ArrayList<>(values));
         if (oldValues == null) {
-            map.put(key, new ArrayList<>(values));
             return true;
         }