You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2021/04/09 12:07:15 UTC

[cxf] 03/04: CXF-8442: 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)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 89eea141f335078da89b54c8cc6feb1bfd673af5
Author: reta <dr...@gmail.com>
AuthorDate: Thu Apr 8 21:11:48 2021 -0400

    CXF-8442: 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)
    
    (cherry picked from commit 7d2928fc88add3b7fae27144d89c07b2801c8aee)
    (cherry picked from commit b15ce32e79cd7d3aca3fcc652686690c9745b8d8)
---
 .../java/org/apache/cxf/io/CacheAndWriteOutputStream.java  | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java b/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
index 482e68c..d89edb9 100644
--- a/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
+++ b/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
@@ -61,19 +61,7 @@ public class CacheAndWriteOutputStream extends CachedOutputStream {
     public OutputStream getFlowThroughStream() {
         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