commit | 9054315b8b84016031d5e162adb9639663cbfc4f | [log] [tgz] |
---|---|---|
author | HIGUCHI Yuta <y-higuchi@ak.jp.nec.com> | Thu Feb 26 22:03:50 2015 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Sat Feb 28 00:41:00 2015 +0000 |
tree | 019d27f16ee5149b17f2dd34f610ecd34cbb2816 | |
parent | c313c405b24841298e3b51db92436810ae0bd8da [diff] |
Retry returning AppId after reload triggered by cache miss Change-Id: I5b5f872ccdd72ccbc8a09bd221821b24a841e04b
diff --git a/core/store/dist/src/main/java/org/onosproject/store/core/impl/DistributedApplicationIdStore.java b/core/store/dist/src/main/java/org/onosproject/store/core/impl/DistributedApplicationIdStore.java index 186fb4e..e6917ec 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/core/impl/DistributedApplicationIdStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/core/impl/DistributedApplicationIdStore.java
@@ -99,6 +99,7 @@ ApplicationId appId = appIds.get(id); if (appId == null) { primeAppIds(); + return appIds.get(id); } return appId; } @@ -110,7 +111,7 @@ private void primeAppIds() { for (DefaultApplicationId appId : appIdsByName.values()) { - appIds.put(appId.id(), appId); + appIds.putIfAbsent(appId.id(), appId); } }