Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 6806f9f8f -> 8d14e9141
[CXF-6070] Instead of NPE, throw a more meaningful exception. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8d14e914 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8d14e914 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8d14e914 Branch: refs/heads/3.0.x-fixes Commit: 8d14e91418435ce5b8d009f73da050880deb51bb Parents: 6806f9f Author: Daniel Kulp <[email protected]> Authored: Wed Oct 29 14:17:48 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Wed Oct 29 14:39:37 2014 -0400 ---------------------------------------------------------------------- core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/8d14e914/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java index 289e919..9114c66 100644 --- a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java +++ b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java @@ -699,7 +699,9 @@ public class ClientImpl } public void onMessage(Message message) { - + if (bus == null) { + throw new IllegalStateException("Message received on a Client that has been closed or destroyed."); + } Endpoint endpoint = message.getExchange().getEndpoint(); if (endpoint == null) { // in this case correlation will occur outside the transport,
