aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-05-31 09:02:08 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-05-31 09:02:08 +0200
commit335b3a1bd0baf8d2060042f292a3e650c988d9fa (patch)
treeca2a44e278fb8522901b7f80f4c413c198c2ea58 /controller-server
parente911924c48bf5301caf808bc091af12bbd2ab363 (diff)
Close closeable
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, 3 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 7dff745bda5..03d641ae804 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
@@ -968,7 +968,9 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
return new HttpResponse(200) {
@Override
public void render(OutputStream outputStream) throws IOException {
- logStream.transferTo(outputStream);
+ try (logStream) {
+ logStream.transferTo(outputStream);
+ }
}
};
}