You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/06/01 13:47:25 UTC
cxf git commit: Avoid a NPE in websocket transport
Repository: cxf
Updated Branches:
refs/heads/master fbf69824d -> 793eebe60
Avoid a NPE in websocket transport
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/793eebe6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/793eebe6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/793eebe6
Branch: refs/heads/master
Commit: 793eebe60d3f934bdaf009f24a392e68c5ab4630
Parents: fbf6982
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Jun 1 14:47:15 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Jun 1 14:47:15 2016 +0100
----------------------------------------------------------------------
.../cxf/transport/websocket/WebSocketTransportFactory.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/793eebe6/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketTransportFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketTransportFactory.java b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketTransportFactory.java
index 96a5587..b1da539 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketTransportFactory.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketTransportFactory.java
@@ -134,6 +134,11 @@ public class WebSocketTransportFactory extends AbstractTransportFactory implemen
AbstractHTTPDestination d = registry.getDestinationForPath(endpointInfo.getAddress());
if (d == null) {
d = factory.createDestination(endpointInfo, bus, registry);
+ if (d == null) {
+ String error = "No destination available. The CXF websocket transport needs either the "
+ + "Jetty WebSocket or Atmosphere dependencies to be available";
+ throw new IOException(error);
+ }
registry.addDestination(d);
configure(bus, d);
d.finalizeConfig();