diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-02 16:03:26 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-02 16:03:26 +0200 |
commit | 6eb01a503b0ecde0b6c740deaadf26b9c222ff19 (patch) | |
tree | dcff58159df7e4a3494571703a7a58b6bb63eb0a /controller-server | |
parent | cc0fec0f4ee566288ee74235b35c436b4e48ac02 (diff) |
Simplify
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java | 4 |
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); } |