You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/10/29 19:40:55 UTC
[2/2] git commit: [CXF-6070] Instead of NPE,
throw a more meaningful exception.
[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/b04113fb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b04113fb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b04113fb
Branch: refs/heads/2.7.x-fixes
Commit: b04113fb88190b1716c8a4e3f18f397b78d1289b
Parents: 0503a5a
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Oct 29 14:17:48 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Oct 29 14:40:44 2014 -0400
----------------------------------------------------------------------
api/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/b04113fb/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
index 70b324e..4971677 100644
--- a/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
+++ b/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
@@ -746,7 +746,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,