vp340 commented on PR #3554:
URL: https://github.com/apache/cxf/pull/3554#issuecomment-6048384881

   Hi @reta, @ffang 
   Thank for catching this scenario 
https://github.com/apache/cxf/pull/3553/changes 
   
   I notice also that the this.close() method calls the super one in 
CachedOutputStream that calls postClose() that close the flowThroughStream. 
   This will result in another IOException that will be add in                 
ex.addSuppressed(suppressed); (see screen above)
   
   I think we should skip that close especially after your change in 3553. If 
the let the flowThroughStream we shouldn't close it sooner. 
   What do U think about it? 
   
   
   Then another point.
   Now we have:
   
   > @Override
       public void close() throws IOException {
           // Ensure closing only one time
           if (closed.compareAndSet(false, true)) {
               super.close();
           }
       }
   
   But what if someone call again the .close() this time wanted to close the 
real flowThroughStream (that now with this solution we will let open (but 
corrupted) ).
   We may want to add a .... else { getFlowThroughStream().close(); } ?? 
   
   Let me know what you think.
   Thanks again!


-- 
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]

Reply via email to