https://issues.apache.org/bugzilla/show_bug.cgi?id=56343

            Bug ID: 56343
           Summary: NPE in
                    org.apache.tomcat.websocket.WsWebSocketContainer.conne
                    ctToServer
           Product: Tomcat 8
           Version: 8.0.5
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: pbieli...@gmail.com

Hi,

I believe there is a bug in 
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(Object pojo,
URI path) method in the following lines:

if (!ClientEndpointConfig.Configurator.class.equals(configuratorClazz)) {
  try {
    configurator = configuratorClazz.newInstance();
  } catch (InstantiationException | IllegalAccessException e) {
    throw new
DeploymentException(sm.getString("wsWebSocketContainer.defaultConfiguratorFail"),
e);
  }
}

I don't understand why you don't like instantiating
ClientEndpointConfig.Configurator class? This is an empty / default
configurator for the endpoint which has a default constructor. Because of this
bug I had do specify explicitly a dummy configurator e.g.:

import javax.websocket.ClientEndpointConfig;
public class CustomConfigurator extends ClientEndpointConfig.Configurator {
}

@ClientEndpoint(configurator = CustomConfigurator.class)
public class ClientEndpoint {

IMHO it's useless.

Cheers,
Przemyslaw

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to