reta commented on a change in pull request #771:
URL: https://github.com/apache/cxf/pull/771#discussion_r610145530
##########
File path: core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
##########
@@ -47,19 +47,32 @@ public void setCacheLimit(long l) {
}
public void closeFlowthroughStream() throws IOException {
- flowThroughStream.flush();
- flowThroughStream.close();
+ postClose();
}
protected void postClose() throws IOException {
- flowThroughStream.flush();
- flowThroughStream.close();
+ if (!isClosed) {
+ flowThroughStream.flush();
+ flowThroughStream.close();
+ isClosed = true;
+ }
}
public OutputStream getFlowThroughStream() {
return flowThroughStream;
}
+ @Override
+ protected void doClose() throws IOException {
+ super.doClose();
+ isClosed = true;
Review comment:
Just for the record, probably not necessary (since `close()` would call
`postClose()`) but won't hurt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]