commit | 737dfb6e511546fb170d31fc0476c1740a217acd | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Wed Feb 22 15:17:42 2017 -0800 |
committer | Thomas Vachuska <tom@onlab.us> | Thu Feb 23 00:22:34 2017 +0000 |
tree | eaa54ea7ba6dd63520dee7e6028a5841211d8c3c | |
parent | 8dba79961f9837ed8e8c90397036039cb2775dff [diff] |
Log missing application dependency. Change-Id: I649b3d8efe758ae65f8a821ceea0b50db66e267d (cherry picked from commit 56a7a6b8e0aa4962a29d6386c0d13b7fa6a54461)
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java index ba3056c..b1e5f2e 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java
@@ -308,8 +308,14 @@ } private boolean hasPrerequisites(ApplicationDescription app) { - return !app.requiredApps().stream().map(this::getId) - .anyMatch(id -> id == null || getApplication(id) == null); + for (String required : app.requiredApps()) { + ApplicationId id = getId(required); + if (id == null || getApplication(id) == null) { + log.error("{} required for {} not available", required, app.name()); + return false; + } + } + return true; } private Application create(ApplicationDescription appDesc, boolean updateTime) {