diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-12-02 21:25:31 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-12-02 21:25:31 +0100 |
commit | 2b4ec517d20e72637ae4b2b92fff1ef0d1f498b6 (patch) | |
tree | 9fc2c12211c7d3e3b49fcf954aa29a41bf8b8abb /controller-server | |
parent | 909850e18a156de41d519a618c13a388857baa1c (diff) |
Status for a cluster may be null
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java | 2 |
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()) |