Skip to content

Commit 41e78d0

Browse files
committed
Fix failing test
1 parent 526d5ba commit 41e78d0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService;
3333
import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler;
3434

35+
import java.util.concurrent.ScheduledThreadPoolExecutor;
36+
3537
/**
3638
* Provides utility methods for parsing common WebSocket XML namespace elements.
3739
*
@@ -43,7 +45,7 @@ class WebSocketNamespaceUtils {
4345

4446
// Check for setRemoveOnCancelPolicy method - available on JDK 7 and higher
4547
private static boolean hasRemoveOnCancelPolicyMethod = ClassUtils.hasMethod(
46-
WebSocketNamespaceUtils.class, "setRemoveOnCancelPolicy", boolean.class);
48+
ScheduledThreadPoolExecutor.class, "setRemoveOnCancelPolicy", boolean.class);
4749

4850

4951
public static RuntimeBeanReference registerHandshakeHandler(Element element, ParserContext parserContext, Object source) {

spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import org.springframework.web.servlet.HandlerMapping;
2323
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
2424

25+
import java.util.concurrent.ScheduledThreadPoolExecutor;
26+
2527
/**
2628
* Configuration support for WebSocket request handling.
2729
*
@@ -32,7 +34,7 @@ public class WebSocketConfigurationSupport {
3234

3335
// Check for setRemoveOnCancelPolicy method - available on JDK 7 and higher
3436
private static boolean hasRemoveOnCancelPolicyMethod = ClassUtils.hasMethod(
35-
WebSocketConfigurationSupport.class, "setRemoveOnCancelPolicy", boolean.class);
37+
ScheduledThreadPoolExecutor.class, "setRemoveOnCancelPolicy", boolean.class);
3638

3739

3840
@Bean

spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import org.springframework.web.socket.WebSocketHandler;
2727
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
2828

29+
import java.util.concurrent.ScheduledThreadPoolExecutor;
30+
2931
/**
3032
* Extends {@link AbstractMessageBrokerConfiguration} and adds configuration for
3133
* receiving and responding to STOMP messages from WebSocket clients.
@@ -41,7 +43,7 @@ public abstract class WebSocketMessageBrokerConfigurationSupport extends Abstrac
4143

4244
// Check for setRemoveOnCancelPolicy method - available on JDK 7 and higher
4345
private static boolean hasRemoveOnCancelPolicyMethod = ClassUtils.hasMethod(
44-
WebSocketConfigurationSupport.class, "setRemoveOnCancelPolicy", boolean.class);
46+
ScheduledThreadPoolExecutor.class, "setRemoveOnCancelPolicy", boolean.class);
4547

4648

4749
private WebSocketTransportRegistration transportRegistration;

0 commit comments

Comments
 (0)