cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject git commit: [CXF-6070] Instead of NPE, throw a more meaningful exception.
Date Wed, 29 Oct 2014 18:38:41 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5e06ba0c4 -> 73ad9a853


[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/73ad9a85
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/73ad9a85
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/73ad9a85

Branch: refs/heads/master
Commit: 73ad9a853d999d7f60039e482c182c79a1d57a09
Parents: 5e06ba0
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Oct 29 14:17:48 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Oct 29 14:38:32 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/73ad9a85/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,


Mime
View raw message