File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
lib/src/main/java/ua/naiksoftware/stomp Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,11 @@ public static StompClient over(Class clazz, String uri) {
2929 * @return StompClient for receiving and sending messages. Call #StompClient.connect
3030 */
3131 public static StompClient over (Class clazz , String uri , Map <String , String > connectHttpHeaders ) {
32- try {
33- if (Class .forName ("org.java_websocket.WebSocket" ) != null && clazz == WebSocket .class ) {
34- return createStompClient (new WebSocketsConnectionProvider (uri , connectHttpHeaders ));
35- } else {
36- throw new RuntimeException ("Not supported overlay transport: " + clazz .getName ());
37- }
38- } catch (ClassNotFoundException e ) {
39- throw new RuntimeException ("Class for transport " + clazz .getName () + " not included to project" , e );
32+ if (clazz == WebSocket .class ) {
33+ return createStompClient (new WebSocketsConnectionProvider (uri , connectHttpHeaders ));
4034 }
35+
36+ throw new RuntimeException ("Not supported overlay transport: " + clazz .getName ());
4137 }
4238
4339 private static StompClient createStompClient (ConnectionProvider connectionProvider ) {
You can’t perform that action at this time.
0 commit comments