remove close() and doClose(), the complex relationships between these methods led to the issues that isClosed flag being set before closing the streams (as the result, streams stayed open)
@@ -62,18 +62,6 @@ public class CacheAndWriteOutputStream extends CachedOutputStream {
return flowThroughStream;
}
- @Override
- protected void doClose() throws IOException {
- super.doClose();
- isClosed = true;
- }
-
- @Override
- public void close() throws IOException {
- super.close();
- isClosed = true;
- }
-
@Override
protected void onWrite() throws IOException {
// does nothing
