Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketListener anonymous classes should be invocable #5043

Closed
sbordet opened this issue Jul 14, 2020 · 0 comments
Closed

WebSocketListener anonymous classes should be invocable #5043

sbordet opened this issue Jul 14, 2020 · 0 comments
Assignees

Comments

@sbordet
Copy link
Contributor

sbordet commented Jul 14, 2020

Jetty version
10.0.x

Description
Classes similar to:

WebSocketListener listener = new WebSocketListener() {
  ...
}

should be processed without errors by the WebSocket implementation.

They currently fail with:

java.lang.RuntimeException: Unable to access method public void org.cometd.client.websocket.jetty.JettyWebSocketTransport$JettyWebSocketDelegate.onWebSocketConnect(org.eclipse.jetty.websocket.api.Session)

probably because we are using the anonymous class rather than the interface to lookup the method handles.

See https://github.com/cometd/cometd/blob/6.0.x/cometd-java/cometd-java-server/cometd-java-server-websocket/cometd-java-server-websocket-tests/src/test/java/org/cometd/server/websocket/ConcurrentAbortPublishTest.java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants