Skip to content

Commit

Permalink
Merge branch 'spring-projects:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dark2momo authored Feb 28, 2025
2 parents 7d9dc40 + 788b66f commit e1e0019
Showing 1 changed file with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 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.
Expand All @@ -22,18 +22,13 @@
import java.util.Map;
import java.util.Objects;

import org.jspecify.annotations.Nullable;

import org.springframework.scheduling.TaskScheduler;
import org.springframework.util.MultiValueMap;
import org.springframework.util.PathMatcher;
import org.springframework.web.HttpRequestHandler;
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.server.support.WebSocketHandlerMapping;
import org.springframework.web.util.UrlPathHelper;
import org.springframework.web.util.pattern.PathPatternParser;

/**
* {@link WebSocketHandlerRegistry} with Spring MVC handler mappings for the
Expand All @@ -48,8 +43,6 @@ public class ServletWebSocketHandlerRegistry implements WebSocketHandlerRegistry

private int order = 1;

private @Nullable UrlPathHelper urlPathHelper;


public ServletWebSocketHandlerRegistry() {
}
Expand All @@ -76,23 +69,6 @@ public int getOrder() {
return this.order;
}

/**
* Set the UrlPathHelper to configure on the {@code SimpleUrlHandlerMapping}
* used to map handshake requests.
* @deprecated use of {@link PathMatcher} and {@link UrlPathHelper} is deprecated
* for use at runtime in web modules in favor of parsed patterns with
* {@link PathPatternParser}.
*/
@Deprecated(since = "7.0", forRemoval = true)
public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) {
this.urlPathHelper = urlPathHelper;
}

@Deprecated(since = "7.0", forRemoval = true)
public @Nullable UrlPathHelper getUrlPathHelper() {
return this.urlPathHelper;
}


/**
* Whether there are any endpoint SockJS registrations without a TaskScheduler.
Expand Down Expand Up @@ -132,9 +108,6 @@ public AbstractHandlerMapping getHandlerMapping() {
WebSocketHandlerMapping hm = new WebSocketHandlerMapping();
hm.setUrlMap(urlMap);
hm.setOrder(this.order);
if (this.urlPathHelper != null) {
hm.setUrlPathHelper(this.urlPathHelper);
}
return hm;
}

Expand Down

0 comments on commit e1e0019

Please sign in to comment.