diff --git a/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketAdapter.java b/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketAdapter.java index ef466ed1c93..1211ce140c0 100644 --- a/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketAdapter.java +++ b/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketAdapter.java @@ -26,11 +26,10 @@ package org.eclipse.jetty.websocket.api; public class WebSocketAdapter implements WebSocketListener { private volatile Session session; - private RemoteEndpoint remote; public RemoteEndpoint getRemote() { - return remote; + return session.getRemote(); } public Session getSession() @@ -66,7 +65,6 @@ public class WebSocketAdapter implements WebSocketListener public void onWebSocketConnect(Session sess) { this.session = sess; - this.remote = sess.getRemote(); } @Override diff --git a/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketBehavior.java b/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketBehavior.java index dd024c425ee..df2ba5f3fd8 100644 --- a/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketBehavior.java +++ b/jetty-websocket/jetty-websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketBehavior.java @@ -27,5 +27,5 @@ package org.eclipse.jetty.websocket.api; public enum WebSocketBehavior { CLIENT, - SERVER; + SERVER } diff --git a/jetty-websocket/jetty-websocket-common/src/main/java/org/eclipse/jetty/websocket/common/JettyWebSocketFrameHandlerFactory.java b/jetty-websocket/jetty-websocket-common/src/main/java/org/eclipse/jetty/websocket/common/JettyWebSocketFrameHandlerFactory.java index 94a61019b3c..8453f6ee363 100644 --- a/jetty-websocket/jetty-websocket-common/src/main/java/org/eclipse/jetty/websocket/common/JettyWebSocketFrameHandlerFactory.java +++ b/jetty-websocket/jetty-websocket-common/src/main/java/org/eclipse/jetty/websocket/common/JettyWebSocketFrameHandlerFactory.java @@ -134,7 +134,7 @@ public class JettyWebSocketFrameHandlerFactory extends ContainerLifeCycle MethodHandle frameHandle = metadata.getFrameHandle(); MethodHandle pingHandle = metadata.getPingHandle(); MethodHandle pongHandle = metadata.getPongHandle(); - BatchMode batchMode = metadata.getBatchMode(); // TODO: what if we're not annotating, who else sets this + BatchMode batchMode = metadata.getBatchMode(); openHandle = bindTo(openHandle, endpointInstance); closeHandle = bindTo(closeHandle, endpointInstance);