Skip to content

Commit c6e644e

Browse files
committed
Polish "Downcast to InetSocketAddress for Jetty 10"
This commit uses the target type where getRemoteAddress and getLocalAddress are defined. See gh-27120
1 parent 62e9165 commit c6e644e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private static class Jetty10SessionHelper implements SessionHelper {
306306

307307
static {
308308
try {
309-
Class<?> type = loader.loadClass("org.eclipse.jetty.websocket.api.WebSocketPolicy");
309+
Class<?> type = loader.loadClass("org.eclipse.jetty.websocket.api.Session");
310310
getTextMessageSizeLimitMethod = type.getMethod("getMaxTextMessageSize");
311311
getBinaryMessageSizeLimitMethod = type.getMethod("getMaxBinaryMessageSize");
312312
getRemoteAddressMethod = type.getMethod("getRemoteAddress");

0 commit comments

Comments
 (0)