Browse Source

Polish "Downcast to InetSocketAddress for Jetty 10"

This commit uses the target type where getRemoteAddress and
getLocalAddress are defined.

See gh-27120
pull/27165/head
Stephane Nicoll 4 years ago
parent
commit
c6e644e5c3
  1. 2
      spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java

2
spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java

@ -306,7 +306,7 @@ public class JettyWebSocketSession extends AbstractWebSocketSession<Session> { @@ -306,7 +306,7 @@ public class JettyWebSocketSession extends AbstractWebSocketSession<Session> {
static {
try {
Class<?> type = loader.loadClass("org.eclipse.jetty.websocket.api.WebSocketPolicy");
Class<?> type = loader.loadClass("org.eclipse.jetty.websocket.api.Session");
getTextMessageSizeLimitMethod = type.getMethod("getMaxTextMessageSize");
getBinaryMessageSizeLimitMethod = type.getMethod("getMaxBinaryMessageSize");
getRemoteAddressMethod = type.getMethod("getRemoteAddress");

Loading…
Cancel
Save