commit | 56a7a6b8e0aa4962a29d6386c0d13b7fa6a54461 | [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:21 2017 +0000 |
tree | e000dd08e3dda397cfd0256fed79a8f69f65090c | |
parent | 0b1449dd3d2ffd7c939528bd40dc852615030768 [diff] |
Log missing application dependency. Change-Id: I649b3d8efe758ae65f8a821ceea0b50db66e267d
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) {