commit | ab9fa3798532dc2f2458aed058a10389d3f52957 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Tue Jul 25 18:06:43 2017 -0700 |
committer | Jordan Halterman <jordan@opennetworking.org> | Thu Jul 27 01:11:40 2017 +0000 |
tree | fb03e51234dab38e218aa9cb017c3cb1bb52742a | |
parent | 781984f3a5c064e544625bc23477d19ce9435f20 [diff] |
Initial empty value should not force overwrite existing. Change-Id: Icb474a4b7d56b78238672f3cbb2cded435df98f5
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceSubStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceSubStore.java index 785ae31..6b4610c 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceSubStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceSubStore.java
@@ -55,7 +55,7 @@ .withSerializer(SERIALIZER) .build(); - childMap.put(Resource.ROOT.id(), new LinkedHashSet<>()); + childMap.putIfAbsent(Resource.ROOT.id(), new LinkedHashSet<>()); } @Override
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDiscreteResourceSubStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDiscreteResourceSubStore.java index 738b8d1..d6eb376 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDiscreteResourceSubStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDiscreteResourceSubStore.java
@@ -53,7 +53,7 @@ .withSerializer(SERIALIZER) .build(); - childMap.put(Resource.ROOT.id(), DiscreteResources.empty()); + childMap.putIfAbsent(Resource.ROOT.id(), DiscreteResources.empty()); } @Override