From 7e9ac120ac7d294673c185412ed866b182c8dead Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Tue, 25 Feb 2025 15:37:10 +0000 Subject: [PATCH] Deprecate UrlPathHelper in ServletWebSocketHandlerRegistry Closes gh-34508 --- .../annotation/ServletWebSocketHandlerRegistry.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java index eb8bf5a33e6b..59686f601ed9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,11 +77,20 @@ public int getOrder() { /** * Set the UrlPathHelper to configure on the {@code SimpleUrlHandlerMapping} * used to map handshake requests. + * @deprecated without a replacement since effectively the UrlPathHelper is + * no longer used with {@code PathPatternParser} used by the default in + * all extensions of {@code AbstractHandlerMapping}. To be removed in 7.0. */ + @Deprecated(since = "6.2.4", forRemoval = true) public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) { this.urlPathHelper = urlPathHelper; } + /** + * Return the configured {@code UrlPathHelper}. + * @deprecated without a replacement; see notice on {@link #setUrlPathHelper} + */ + @Deprecated(since = "6.2.4", forRemoval = true) @Nullable public UrlPathHelper getUrlPathHelper() { return this.urlPathHelper;