Skip to content

Commit

Permalink
Merge branch '5.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Oct 6, 2021
2 parents fb7eea9 + 41ae963 commit 2d1e0d5
Show file tree
Hide file tree
Showing 35 changed files with 81 additions and 79 deletions.
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ configure([rootProject] + javaProjects) { project ->
}

checkstyle {
toolVersion = "8.41"
toolVersion = "9.0"
configDirectory.set(rootProject.file("src/checkstyle"))
}

Expand All @@ -325,8 +325,7 @@ configure([rootProject] + javaProjects) { project ->
// JSR-305 only used for non-required meta-annotations
compileOnly("com.google.code.findbugs:jsr305")
testCompileOnly("com.google.code.findbugs:jsr305")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.28")
checkstyle("com.puppycrawl.tools:checkstyle:8.41")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.29")
}

ext.javadocLinks = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ public abstract class BeanUtils {
* @param clazz class to instantiate
* @return the new instance
* @throws BeanInstantiationException if the bean cannot be instantiated
* @see Class#newInstance()
* @deprecated as of Spring 5.0, following the deprecation of
* {@link Class#newInstance()} in JDK 9
* @see Class#newInstance()
*/
@Deprecated
public static <T> T instantiate(Class<T> clazz) throws BeanInstantiationException {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -185,9 +185,9 @@ protected void processProperties(ConfigurableListableBeanFactory beanFactoryToPr
/**
* Implemented for compatibility with
* {@link org.springframework.beans.factory.config.PlaceholderConfigurerSupport}.
* @throws UnsupportedOperationException in this implementation
* @deprecated in favor of
* {@link #processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)}
* @throws UnsupportedOperationException in this implementation
*/
@Override
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -44,8 +44,8 @@ public interface JndiCallback<T> {
* <p>Implementations don't need to worry about error handling
* or cleanup, as the JndiTemplate class will handle this.
* @param ctx the current JNDI context
* @throws NamingException if thrown by JNDI methods
* @return a result object, or {@code null}
* @throws NamingException if thrown by JNDI methods
*/
@Nullable
T doInContext(Context ctx) throws NamingException;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -65,9 +65,9 @@ public interface AttributeAccessor {
* @param computeFunction a function that computes a new value for the attribute
* name; the function must not return a {@code null} value
* @return the existing value or newly computed value for the named attribute
* @since 5.3.3
* @see #getAttribute(String)
* @see #setAttribute(String, Object)
* @since 5.3.3
*/
@SuppressWarnings("unchecked")
default <T> T computeAttribute(String name, Function<String, T> computeFunction) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -169,14 +169,14 @@ public static <E> Collection<E> createCollection(Class<?> collectionType, int ca
* (note: only relevant for {@link EnumSet} creation)
* @param capacity the initial capacity
* @return a new collection instance
* @throws IllegalArgumentException if the supplied {@code collectionType} is
* {@code null}; or if the desired {@code collectionType} is {@link EnumSet} and
* the supplied {@code elementType} is not a subtype of {@link Enum}
* @since 4.1.3
* @see java.util.LinkedHashSet
* @see java.util.ArrayList
* @see java.util.TreeSet
* @see java.util.EnumSet
* @throws IllegalArgumentException if the supplied {@code collectionType} is
* {@code null}; or if the desired {@code collectionType} is {@link EnumSet} and
* the supplied {@code elementType} is not a subtype of {@link Enum}
*/
@SuppressWarnings({"unchecked", "cast"})
public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) {
Expand Down Expand Up @@ -285,14 +285,14 @@ public static <K, V> Map<K, V> createMap(Class<?> mapType, int capacity) {
* (note: only relevant for {@link EnumMap} creation)
* @param capacity the initial capacity
* @return a new map instance
* @throws IllegalArgumentException if the supplied {@code mapType} is
* {@code null}; or if the desired {@code mapType} is {@link EnumMap} and
* the supplied {@code keyType} is not a subtype of {@link Enum}
* @since 4.1.3
* @see java.util.LinkedHashMap
* @see java.util.TreeMap
* @see org.springframework.util.LinkedMultiValueMap
* @see java.util.EnumMap
* @throws IllegalArgumentException if the supplied {@code mapType} is
* {@code null}; or if the desired {@code mapType} is {@link EnumMap} and
* the supplied {@code keyType} is not a subtype of {@link Enum}
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public static <K, V> Map<K, V> createMap(Class<?> mapType, @Nullable Class<?> keyType, int capacity) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -74,10 +74,10 @@ public String toString() {
/**
* {@link AnnotationFilter} that never matches and can be used when no
* filtering is needed (allowing for any annotation types to be present).
* @see #PLAIN
* @deprecated as of 5.2.6 since the {@link MergedAnnotations} model
* always ignores lang annotations according to the {@link #PLAIN} filter
* (for efficiency reasons)
* @see #PLAIN
*/
@Deprecated
AnnotationFilter NONE = new AnnotationFilter() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -23,10 +23,10 @@
/**
* Callback interface used to process annotations.
*
* @param <C> the context type
* @param <R> the result type
* @author Phillip Webb
* @since 5.2
* @param <C> the context type
* @param <R> the result type
* @see AnnotationsScanner
* @see TypeMappedAnnotations
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -27,8 +27,8 @@
* source object which is typically an {@link Annotation}, {@link Map}, or
* {@link TypeMappedAnnotation}.
*
* @since 5.2.4
* @author Sam Brannen
* @since 5.2.4
*/
@FunctionalInterface
interface ValueExtractor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@ protected final ConfigurablePropertyResolver getPropertyResolver() {
* </pre>
*
* <p>The search order is now C, D, A, B as desired.
*
* <p>Beyond these recommendations, subclasses may use any of the {@code add*},
* {@code remove}, or {@code replace} methods exposed by {@link MutablePropertySources}
* in order to create the exact arrangement of property sources desired.
*
* <p>The base implementation registers no property sources.
*
* <p>Note that clients of any {@link ConfigurableEnvironment} may further customize
* property sources via the {@link #getPropertySources()} accessor, typically within
* an {@link org.springframework.context.ApplicationContextInitializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public Class<?> loadClass(String name) throws ClassNotFoundException {
assertThat(ClassUtils.isCacheSafe(composite, childLoader3)).isTrue();
}

@ParameterizedTest
@ParameterizedTest(name = "''{0}'' -> {1}")
@CsvSource(textBlock = """
boolean, boolean
byte, byte
Expand All @@ -172,7 +172,7 @@ public Class<?> loadClass(String name) throws ClassNotFoundException {
[J, long[]
[F, float[]
[D, double[]
""")
""")
void resolvePrimitiveClassName(String input, Class<?> output) {
assertThat(ClassUtils.resolvePrimitiveClassName(input)).isEqualTo(output);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ RSocketRequester transports(
* @param host the server host
* @param port the server port
* @return an {@code RSocketRequester} for the connection
* @deprecated as of 5.3 in favor of {@link #tcp(String, int)}
* @see TcpClientTransport
* @deprecated as of 5.3 in favor of {@link #tcp(String, int)}
*/
@Deprecated
Mono<RSocketRequester> connectTcp(String host, int port);
Expand All @@ -315,8 +315,8 @@ RSocketRequester transports(
* Connect to the server over WebSocket.
* @param uri the RSocket server endpoint URI
* @return an {@code RSocketRequester} for the connection
* @deprecated as of 5.3 in favor of {@link #websocket(URI)}
* @see WebsocketClientTransport
* @deprecated as of 5.3 in favor of {@link #websocket(URI)}
*/
@Deprecated
Mono<RSocketRequester> connectWebSocket(URI uri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public void setExpires(@Nullable ZonedDateTime expires) {

/**
* Get the "Expires" attribute for this cookie.
* @since 5.1.11
* @return the "Expires" attribute for this cookie, or {@code null} if not set
* @since 5.1.11
*/
@Nullable
public ZonedDateTime getExpires() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
Expand Down Expand Up @@ -300,8 +300,8 @@ public boolean isInheritInitializers() {
* Get the name of the context hierarchy level that was declared via
* {@link ContextConfiguration @ContextConfiguration}.
* @return the name of the context hierarchy level or {@code null} if not applicable
* @see ContextConfiguration#name()
* @since 3.2.2
* @see ContextConfiguration#name()
*/
@Nullable
public String getName() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
Expand Down Expand Up @@ -372,8 +372,8 @@ public ContextLoader getContextLoader() {
* Get the {@link MergedContextConfiguration} for the parent application context
* in a context hierarchy.
* @return the parent configuration or {@code null} if there is no parent
* @see #getParentApplicationContext()
* @since 3.2.2
* @see #getParentApplicationContext()
*/
@Nullable
public MergedContextConfiguration getParent() {
Expand All @@ -386,8 +386,8 @@ public MergedContextConfiguration getParent() {
* <p>If the parent context has not yet been loaded, it will be loaded, stored
* in the cache, and then returned.
* @return the parent {@code ApplicationContext} or {@code null} if there is no parent
* @see #getParent()
* @since 3.2.2
* @see #getParent()
*/
@Nullable
public ApplicationContext getParentApplicationContext() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -174,8 +174,8 @@ String getSeparator() {

/**
* Get the prefixes that identify single-line comments within the SQL scripts.
* @see SqlConfig#commentPrefixes()
* @since 5.2
* @see SqlConfig#commentPrefixes()
*/
String[] getCommentPrefixes() {
return this.commentPrefixes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
Expand Down Expand Up @@ -77,10 +77,10 @@ public ProfileValueChecker(Statement next, Class<?> testClass, @Nullable Method
* <p>If a test is not enabled, this method will abort further evaluation
* of the execution chain with a failed assumption; otherwise, this method
* will simply evaluate the next {@link Statement} in the execution chain.
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class)
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Method, Class)
* @throws AssumptionViolatedException if the test is disabled
* @throws Throwable if evaluation of the next statement fails
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class)
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Method, Class)
*/
@Override
public void evaluate() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -97,9 +97,9 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* context and registers a JVM shutdown hook for it.</li>
* </ul>
* @return a new application context
* @since 3.1
* @see org.springframework.test.context.SmartContextLoader#loadContext(MergedContextConfiguration)
* @see GenericApplicationContext
* @since 3.1
*/
@Override
public final ConfigurableApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception {
Expand Down Expand Up @@ -170,10 +170,10 @@ protected void validateMergedContextConfiguration(MergedContextConfiguration mer
* and {@link AbstractContextLoader#prepareContext(ConfigurableApplicationContext, MergedContextConfiguration)}
* for an alternative.
* @return a new application context
* @since 2.5
* @see org.springframework.test.context.ContextLoader#loadContext
* @see GenericApplicationContext
* @see #loadContext(MergedContextConfiguration)
* @since 2.5
*/
@Override
public final ConfigurableApplicationContext loadContext(String... locations) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -61,8 +61,8 @@ protected String[] getResourceSuffixes() {
* {@code GenericGroovyXmlContextLoader} supports both Groovy and XML
* resource types for detection of defaults. Consequently, this method
* is not supported.
* @see #getResourceSuffixes()
* @throws UnsupportedOperationException in this implementation
* @see #getResourceSuffixes()
*/
@Override
protected String getResourceSuffix() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -259,8 +259,8 @@ protected void customizeContext(
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
* @see org.springframework.test.context.ContextLoader#loadContext(java.lang.String[])
* @throws UnsupportedOperationException in this implementation
* @see org.springframework.test.context.ContextLoader#loadContext(java.lang.String[])
*/
@Override
public final ApplicationContext loadContext(String... locations) throws Exception {
Expand Down
Loading

0 comments on commit 2d1e0d5

Please sign in to comment.