summaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-12-02 21:25:31 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-12-02 21:25:31 +0100
commit2b4ec517d20e72637ae4b2b92fff1ef0d1f498b6 (patch)
tree9fc2c12211c7d3e3b49fcf954aa29a41bf8b8abb /controller-server/src/main/java/com/yahoo
parent909850e18a156de41d519a618c13a388857baa1c (diff)
Status for a cluster may be null
Diffstat (limited to 'controller-server/src/main/java/com/yahoo')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
index 4a6d6e2e72d..cbf6307f5e6 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
@@ -1576,7 +1576,7 @@ public class ApplicationApiHandler extends LoggingRequestHandler {
.forEach(cluster -> {
Cursor clusterObject = clustersArray.addObject();
clusterObject.setString("name", cluster.getKey());
- setStatus(clusterObject.setObject("status"), cluster.getValue().common());
+ cluster.getValue().common().ifPresent(common -> setStatus(clusterObject.setObject("status"), common));
Cursor pendingArray = clusterObject.setArray("pending");
cluster.getValue().pending().entrySet().stream().sorted(comparingByKey())