Skip to content

Commit

Permalink
Fixes NPE if ClientImpl has been closed/destroyed before the end of i…
Browse files Browse the repository at this point in the history
…nvokation (#2140)

* Fixes NPE if ClientImpl has been closed/destroyed before the end of the invokation

* Guard setResponseContext

* Fixes checkstyle
  • Loading branch information
ctabin authored Nov 7, 2024
1 parent b16ea53 commit c6c6817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,9 @@ public void onMessage(Message message) {
Integer responseCode = (Integer)exchange.get(Message.RESPONSE_CODE);
resContext.put(MessageContext.HTTP_RESPONSE_CODE, responseCode);
resContext.put(org.apache.cxf.message.Message.RESPONSE_CODE, responseCode);
setResponseContext(resContext);
if (null != responseContext) {
setResponseContext(resContext);
}
}
if (origLoader != null) {
origLoader.reset();
Expand Down

0 comments on commit c6c6817

Please sign in to comment.