This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/main by this push:
new 9b23b07f48 Fix
org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitTest throwing
java.lang.NullPointerException (#2759)
9b23b07f48 is described below
commit 9b23b07f481aaa2c2e42398c90f6c0d2d28123bc
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)
---
.../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;
}