Early removal of 5.x-deprecated code

Closes gh-27686
This commit is contained in:
Juergen Hoeller
2021-11-18 09:18:06 +01:00
parent 17cdd97c37
commit 4750a9430c
132 changed files with 89 additions and 9216 deletions

View File

@@ -1,74 +0,0 @@
/*
* Copyright 2002-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.annotation.support;
import org.springframework.lang.Nullable;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.validation.Validator;
/**
* A resolver to extract and convert the payload of a message using a
* {@link MessageConverter}. It also validates the payload using a
* {@link Validator} if the argument is annotated with a Validation annotation.
*
* @author Rossen Stoyanchev
* @author Juergen Hoeller
* @author Brian Clozel
* @author Stephane Nicoll
* @since 4.0
* @deprecated as of 5.2, in favor of {@link PayloadMethodArgumentResolver}
*/
@Deprecated
public class PayloadArgumentResolver extends PayloadMethodArgumentResolver {
/**
* Create a new {@code PayloadArgumentResolver} with the given
* {@link MessageConverter}.
* @param messageConverter the MessageConverter to use (required)
* @since 4.0.9
*/
public PayloadArgumentResolver(MessageConverter messageConverter) {
this(messageConverter, null);
}
/**
* Create a new {@code PayloadArgumentResolver} with the given
* {@link MessageConverter} and {@link Validator}.
* @param messageConverter the MessageConverter to use (required)
* @param validator the Validator to use (optional)
*/
public PayloadArgumentResolver(MessageConverter messageConverter, @Nullable Validator validator) {
this(messageConverter, validator, true);
}
/**
* Create a new {@code PayloadArgumentResolver} with the given
* {@link MessageConverter} and {@link Validator}.
* @param messageConverter the MessageConverter to use (required)
* @param validator the Validator to use (optional)
* @param useDefaultResolution if "true" (the default) this resolver supports
* all parameters; if "false" then only arguments with the {@code @Payload}
* annotation are supported.
*/
public PayloadArgumentResolver(MessageConverter messageConverter, @Nullable Validator validator,
boolean useDefaultResolution) {
super(messageConverter, validator, useDefaultResolution);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -70,21 +70,6 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R
public static final RSocketFrameTypeMessageCondition EMPTY_CONDITION = new RSocketFrameTypeMessageCondition();
/**
* Condition to match "REQUEST_FNF", "REQUEST_RESPONSE", "REQUEST_STREAM",
* and "REQUEST_CHANNEL".
* @deprecated as of 5.2.2 because matching to all interaction types is too
* flexible. Please use one of the other constants in this class that match
* to specific frames.
*/
@Deprecated
public static final RSocketFrameTypeMessageCondition REQUEST_CONDITION =
new RSocketFrameTypeMessageCondition(
FrameType.REQUEST_FNF,
FrameType.REQUEST_RESPONSE,
FrameType.REQUEST_STREAM,
FrameType.REQUEST_CHANNEL);
/** Per FrameType cache to return ready instances from getMatchingCondition. */
private static final Map<String, RSocketFrameTypeMessageCondition> frameTypeConditionCache;

View File

@@ -504,29 +504,15 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
}
@Bean
@SuppressWarnings("deprecation")
public SimpUserRegistry userRegistry(
AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) {
SimpUserRegistry userRegistry = createLocalUserRegistry();
MessageBrokerRegistry brokerRegistry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel);
if (userRegistry == null) {
userRegistry = createLocalUserRegistry(brokerRegistry.getUserRegistryOrder());
}
SimpUserRegistry userRegistry = createLocalUserRegistry(brokerRegistry.getUserRegistryOrder());
boolean broadcast = brokerRegistry.getUserRegistryBroadcast() != null;
return (broadcast ? new MultiServerUserRegistry(userRegistry) : userRegistry);
}
/**
* Create the user registry that provides access to local users.
* @deprecated as of 5.1 in favor of {@link #createLocalUserRegistry(Integer)}
*/
@Deprecated
@Nullable
protected SimpUserRegistry createLocalUserRegistry() {
return null;
}
/**
* Create the user registry that provides access to local users.
* @param order the order to use as a {@link SmartApplicationListener}.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 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.
@@ -69,18 +69,6 @@ public class ChannelRegistration {
return this;
}
/**
* Configure interceptors for the message channel.
* @deprecated as of 4.3.12, in favor of {@link #interceptors(ChannelInterceptor...)}
*/
@Deprecated
public ChannelRegistration setInterceptors(@Nullable ChannelInterceptor... interceptors) {
if (interceptors != null) {
this.interceptors.addAll(Arrays.asList(interceptors));
}
return this;
}
protected boolean hasTaskExecutor() {
return (this.registration != null);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -30,7 +30,6 @@ import org.springframework.messaging.simp.SimpLogging;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.util.Assert;
import org.springframework.util.PathMatcher;
import org.springframework.util.StringUtils;
/**
@@ -122,29 +121,6 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver {
return this.removeLeadingSlash;
}
/**
* Provide the {@code PathMatcher} in use for working with destinations
* which in turn helps to determine whether the leading slash should be
* kept in actual destinations after removing the
* {@link #setUserDestinationPrefix userDestinationPrefix}.
* <p>By default actual destinations have a leading slash, e.g.
* {@code /queue/position-updates} which makes sense with brokers that
* support destinations with slash as separator. When a {@code PathMatcher}
* is provided that supports an alternative separator, then resulting
* destinations won't have a leading slash, e.g. {@code
* jms.queue.position-updates}.
* @param pathMatcher the PathMatcher used to work with destinations
* @since 4.3
* @deprecated as of 4.3.14 this property is no longer used and is replaced
* by {@link #setRemoveLeadingSlash(boolean)} that indicates more explicitly
* whether to keep the leading slash which may or may not be the case
* regardless of how the {@code PathMatcher} is configured.
*/
@Deprecated
public void setPathMatcher(@Nullable PathMatcher pathMatcher) {
// Do nothing
}
@Override
@Nullable