vp340 commented on PR #3554:
URL: https://github.com/apache/cxf/pull/3554#issuecomment-6049336408
Hi @reta , @ffang
I also give it a try to
`@Override
public void close() throws IOException {
// Ensure closing only one time
if (closed.compareAndSet(false, true)) {
super.close();
} else {
// Still behave as a pass-through for the flowThroughStream,
// closing it if .close() is explicitly called
getFlowThroughStream().close();
}
}`
I did notice, however, that the class CacheAndWriteOutputStream maintain the
closure status of the flowThroughStream (using private boolean isClosed; )
...overriding postClose() we completely skip that same logic.
Is there a particular reason that LoggingOutputStream class doesn't check if
it has already close the underlying flowThroughStream ?
We should add that check too?
Let me know what U think or if U have any concern about anything.
Fell free to modify this PR as you find suitable.
Good night (or good morning depending on where U live :) )
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]