summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-08-31 17:19:27 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-08-31 17:19:27 +0200
commit6b5474b527417e41f6d8ef2ef922899c5accc2c5 (patch)
treefbe7b977c25a1f9450c6e2b3ce24ee530f72b656 /container-core
parent204b4ce460a30eb744a7cbbba1fdbb4b07d16af3 (diff)
Avoid code duplication and make more clear that close is simply flush
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/ContentChannelOutputStream.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/ContentChannelOutputStream.java b/container-core/src/main/java/com/yahoo/container/jdisc/ContentChannelOutputStream.java
index 9c48955bf4c..329889e70c0 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/ContentChannelOutputStream.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/ContentChannelOutputStream.java
@@ -53,11 +53,7 @@ public class ContentChannelOutputStream extends OutputStream implements Writable
public void close() throws IOException {
// the endpoint is closed in a finally{} block inside AbstractHttpRequestHandler
// this class should be possible to close willynilly as it is exposed to plug-ins
- try {
- buffer.flush();
- } catch (RuntimeException e) {
- throw new IOException(Exceptions.toMessageString(e), e);
- }
+ flush();
}
/**