cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] git commit: [CXF-6070] Instead of NPE, throw a more meaningful exception.
Date Wed, 29 Oct 2014 18:40:55 GMT
[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 <dkulp@apache.org>
Authored: Wed Oct 29 14:17:48 2014 -0400
Committer: Daniel Kulp <dkulp@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,


Mime
View raw message