This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 4.0.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit ba9b61cfcf5bcd9b729d3d261fa609c80d864ccb Author: Andriy Redko <[email protected]> AuthorDate: Sat Nov 29 07:57:01 2025 -0500 Fix org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitTest throwing java.lang.NullPointerException (#2759) (cherry picked from commit 9b23b07f481aaa2c2e42398c90f6c0d2d28123bc) (cherry picked from commit 64b81fe1510fdd1c250f48100ac3201646932163) --- .../src/main/java/org/apache/cxf/transport/http/HTTPConduit.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java index 7b185d5931..dcbcc8fbe5 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java @@ -1733,8 +1733,9 @@ public abstract class HTTPConduit //not going to be resending or anything, clear out the stuff in the out message //to free memory outMessage.removeContent(OutputStream.class); - if (cachingForRetransmission && cachedStream != null) { - cachedStream.close(); + final CacheAndWriteOutputStream stream = cachedStream; + if (cachingForRetransmission && stream != null) { + stream.close(); } cachedStream = null; }
