eclipse-ee4j / eclipse-ee4j/tyrus
Tyrus does not provide enough info when the client endpoint cannot be instantiated.
- Dominant language
- Java
- Stars
- 128
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
following code completes without any exception + it can even allow to send a message. Returned session is closed (isOpen() returns false), but there is no information about why that happened.
```
public class Test {
public static void main(String[] args) throws IOException, DeploymentException, IllegalAccessException,
InstantiationException {
WebSocketContainer client = ContainerProvider.getWebSocketContainer();
Session s = client.connectToServer(MyEndpoint.class,
URI.create("ws://something.somewhere:someport/somepath"));
System.out.println("XXX " + s.isOpen());
System.in.read();
}
@ClientEndpoint
public class MyEndpoint {
@OnOpen
public void onOpen(Session session) {
System.out.println("onOpen " + session.isOpen());
}
}
}
```
#### Affected Versions
[1.9]
Contributor guide
Assessment
This issue has not been assessed yet.