summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-09-02 16:03:26 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-09-02 16:03:26 +0200
commit6eb01a503b0ecde0b6c740deaadf26b9c222ff19 (patch)
treedcff58159df7e4a3494571703a7a58b6bb63eb0a /controller-server
parentcc0fec0f4ee566288ee74235b35c436b4e48ac02 (diff)
Simplify
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java4
1 files changed, 2 insertions, 2 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 640103fc084..95d338d6da0 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
@@ -2094,8 +2094,8 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
String region, String hostname, HttpRequest request) {
NodeRepository nodeRepository = controller.serviceRegistry().configServer().nodeRepository();
ZoneId zone = requireZone(environment, region);
- Slime report = getReport(nodeRepository, zone, tenant, application, instance, hostname).orElse(null);
- if (report == null) throw new NotExistsException("No service dump for node " + hostname);
+ Slime report = getReport(nodeRepository, zone, tenant, application, instance, hostname)
+ .orElseThrow(() -> new NotExistsException("No service dump for node " + hostname));
return new SlimeJsonResponse(report);
}