Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29

This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
This commit is contained in:
Sam Brannen 2021-10-06 12:02:26 +02:00
parent 47b0da6b25
commit 41ae9632d1
34 changed files with 79 additions and 77 deletions

View File

@ -340,7 +340,7 @@ configure([rootProject] + javaProjects) { project ->
} }
checkstyle { checkstyle {
toolVersion = "8.41" toolVersion = "9.0"
configDirectory.set(rootProject.file("src/checkstyle")) configDirectory.set(rootProject.file("src/checkstyle"))
} }
@ -362,8 +362,7 @@ configure([rootProject] + javaProjects) { project ->
// JSR-305 only used for non-required meta-annotations // JSR-305 only used for non-required meta-annotations
compileOnly("com.google.code.findbugs:jsr305") compileOnly("com.google.code.findbugs:jsr305")
testCompileOnly("com.google.code.findbugs:jsr305") testCompileOnly("com.google.code.findbugs:jsr305")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.28") checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.29")
checkstyle("com.puppycrawl.tools:checkstyle:8.41")
} }
ext.javadocLinks = [ ext.javadocLinks = [

View File

@ -100,9 +100,9 @@ public abstract class BeanUtils {
* @param clazz class to instantiate * @param clazz class to instantiate
* @return the new instance * @return the new instance
* @throws BeanInstantiationException if the bean cannot be instantiated * @throws BeanInstantiationException if the bean cannot be instantiated
* @see Class#newInstance()
* @deprecated as of Spring 5.0, following the deprecation of * @deprecated as of Spring 5.0, following the deprecation of
* {@link Class#newInstance()} in JDK 9 * {@link Class#newInstance()} in JDK 9
* @see Class#newInstance()
*/ */
@Deprecated @Deprecated
public static <T> T instantiate(Class<T> clazz) throws BeanInstantiationException { public static <T> T instantiate(Class<T> clazz) throws BeanInstantiationException {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -185,9 +185,9 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
/** /**
* Implemented for compatibility with * Implemented for compatibility with
* {@link org.springframework.beans.factory.config.PlaceholderConfigurerSupport}. * {@link org.springframework.beans.factory.config.PlaceholderConfigurerSupport}.
* @throws UnsupportedOperationException in this implementation
* @deprecated in favor of * @deprecated in favor of
* {@link #processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)} * {@link #processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)}
* @throws UnsupportedOperationException in this implementation
*/ */
@Override @Override
@Deprecated @Deprecated

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -44,8 +44,8 @@ public interface JndiCallback<T> {
* <p>Implementations don't need to worry about error handling * <p>Implementations don't need to worry about error handling
* or cleanup, as the JndiTemplate class will handle this. * or cleanup, as the JndiTemplate class will handle this.
* @param ctx the current JNDI context * @param ctx the current JNDI context
* @throws NamingException if thrown by JNDI methods
* @return a result object, or {@code null} * @return a result object, or {@code null}
* @throws NamingException if thrown by JNDI methods
*/ */
@Nullable @Nullable
T doInContext(Context ctx) throws NamingException; T doInContext(Context ctx) throws NamingException;

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -65,9 +65,9 @@ public interface AttributeAccessor {
* @param computeFunction a function that computes a new value for the attribute * @param computeFunction a function that computes a new value for the attribute
* name; the function must not return a {@code null} value * name; the function must not return a {@code null} value
* @return the existing value or newly computed value for the named attribute * @return the existing value or newly computed value for the named attribute
* @since 5.3.3
* @see #getAttribute(String) * @see #getAttribute(String)
* @see #setAttribute(String, Object) * @see #setAttribute(String, Object)
* @since 5.3.3
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
default <T> T computeAttribute(String name, Function<String, T> computeFunction) { default <T> T computeAttribute(String name, Function<String, T> computeFunction) {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -169,14 +169,14 @@ public final class CollectionFactory {
* (note: only relevant for {@link EnumSet} creation) * (note: only relevant for {@link EnumSet} creation)
* @param capacity the initial capacity * @param capacity the initial capacity
* @return a new collection instance * @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 * @since 4.1.3
* @see java.util.LinkedHashSet * @see java.util.LinkedHashSet
* @see java.util.ArrayList * @see java.util.ArrayList
* @see java.util.TreeSet * @see java.util.TreeSet
* @see java.util.EnumSet * @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"}) @SuppressWarnings({"unchecked", "cast"})
public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) { public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) {
@ -285,14 +285,14 @@ public final class CollectionFactory {
* (note: only relevant for {@link EnumMap} creation) * (note: only relevant for {@link EnumMap} creation)
* @param capacity the initial capacity * @param capacity the initial capacity
* @return a new map instance * @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 * @since 4.1.3
* @see java.util.LinkedHashMap * @see java.util.LinkedHashMap
* @see java.util.TreeMap * @see java.util.TreeMap
* @see org.springframework.util.LinkedMultiValueMap * @see org.springframework.util.LinkedMultiValueMap
* @see java.util.EnumMap * @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"}) @SuppressWarnings({"rawtypes", "unchecked"})
public static <K, V> Map<K, V> createMap(Class<?> mapType, @Nullable Class<?> keyType, int capacity) { public static <K, V> Map<K, V> createMap(Class<?> mapType, @Nullable Class<?> keyType, int capacity) {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -74,10 +74,10 @@ public interface AnnotationFilter {
/** /**
* {@link AnnotationFilter} that never matches and can be used when no * {@link AnnotationFilter} that never matches and can be used when no
* filtering is needed (allowing for any annotation types to be present). * filtering is needed (allowing for any annotation types to be present).
* @see #PLAIN
* @deprecated as of 5.2.6 since the {@link MergedAnnotations} model * @deprecated as of 5.2.6 since the {@link MergedAnnotations} model
* always ignores lang annotations according to the {@link #PLAIN} filter * always ignores lang annotations according to the {@link #PLAIN} filter
* (for efficiency reasons) * (for efficiency reasons)
* @see #PLAIN
*/ */
@Deprecated @Deprecated
AnnotationFilter NONE = new AnnotationFilter() { AnnotationFilter NONE = new AnnotationFilter() {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,10 +23,10 @@ import org.springframework.lang.Nullable;
/** /**
* Callback interface used to process annotations. * Callback interface used to process annotations.
* *
* @param <C> the context type
* @param <R> the result type
* @author Phillip Webb * @author Phillip Webb
* @since 5.2 * @since 5.2
* @param <C> the context type
* @param <R> the result type
* @see AnnotationsScanner * @see AnnotationsScanner
* @see TypeMappedAnnotations * @see TypeMappedAnnotations
*/ */

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,8 +27,8 @@ import org.springframework.lang.Nullable;
* source object which is typically an {@link Annotation}, {@link Map}, or * source object which is typically an {@link Annotation}, {@link Map}, or
* {@link TypeMappedAnnotation}. * {@link TypeMappedAnnotation}.
* *
* @since 5.2.4
* @author Sam Brannen * @author Sam Brannen
* @since 5.2.4
*/ */
@FunctionalInterface @FunctionalInterface
interface ValueExtractor { interface ValueExtractor {

View File

@ -209,10 +209,13 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* </pre> * </pre>
* *
* <p>The search order is now C, D, A, B as desired. * <p>The search order is now C, D, A, B as desired.
*
* <p>Beyond these recommendations, subclasses may use any of the {@code add*}, * <p>Beyond these recommendations, subclasses may use any of the {@code add*},
* {@code remove}, or {@code replace} methods exposed by {@link MutablePropertySources} * {@code remove}, or {@code replace} methods exposed by {@link MutablePropertySources}
* in order to create the exact arrangement of property sources desired. * in order to create the exact arrangement of property sources desired.
*
* <p>The base implementation registers no property sources. * <p>The base implementation registers no property sources.
*
* <p>Note that clients of any {@link ConfigurableEnvironment} may further customize * <p>Note that clients of any {@link ConfigurableEnvironment} may further customize
* property sources via the {@link #getPropertySources()} accessor, typically within * property sources via the {@link #getPropertySources()} accessor, typically within
* an {@link org.springframework.context.ApplicationContextInitializer * an {@link org.springframework.context.ApplicationContextInitializer

View File

@ -305,8 +305,8 @@ public interface RSocketRequester extends Disposable {
* @param host the server host * @param host the server host
* @param port the server port * @param port the server port
* @return an {@code RSocketRequester} for the connection * @return an {@code RSocketRequester} for the connection
* @deprecated as of 5.3 in favor of {@link #tcp(String, int)}
* @see TcpClientTransport * @see TcpClientTransport
* @deprecated as of 5.3 in favor of {@link #tcp(String, int)}
*/ */
@Deprecated @Deprecated
Mono<RSocketRequester> connectTcp(String host, int port); Mono<RSocketRequester> connectTcp(String host, int port);
@ -315,8 +315,8 @@ public interface RSocketRequester extends Disposable {
* Connect to the server over WebSocket. * Connect to the server over WebSocket.
* @param uri the RSocket server endpoint URI * @param uri the RSocket server endpoint URI
* @return an {@code RSocketRequester} for the connection * @return an {@code RSocketRequester} for the connection
* @deprecated as of 5.3 in favor of {@link #websocket(URI)}
* @see WebsocketClientTransport * @see WebsocketClientTransport
* @deprecated as of 5.3 in favor of {@link #websocket(URI)}
*/ */
@Deprecated @Deprecated
Mono<RSocketRequester> connectWebSocket(URI uri); Mono<RSocketRequester> connectWebSocket(URI uri);

View File

@ -68,8 +68,8 @@ public class MockCookie extends Cookie {
/** /**
* Get the "Expires" attribute for this cookie. * Get the "Expires" attribute for this cookie.
* @since 5.1.11
* @return the "Expires" attribute for this cookie, or {@code null} if not set * @return the "Expires" attribute for this cookie, or {@code null} if not set
* @since 5.1.11
*/ */
@Nullable @Nullable
public ZonedDateTime getExpires() { public ZonedDateTime getExpires() {

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -300,8 +300,8 @@ public class ContextConfigurationAttributes {
* Get the name of the context hierarchy level that was declared via * Get the name of the context hierarchy level that was declared via
* {@link ContextConfiguration @ContextConfiguration}. * {@link ContextConfiguration @ContextConfiguration}.
* @return the name of the context hierarchy level or {@code null} if not applicable * @return the name of the context hierarchy level or {@code null} if not applicable
* @see ContextConfiguration#name()
* @since 3.2.2 * @since 3.2.2
* @see ContextConfiguration#name()
*/ */
@Nullable @Nullable
public String getName() { public String getName() {

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -372,8 +372,8 @@ public class MergedContextConfiguration implements Serializable {
* Get the {@link MergedContextConfiguration} for the parent application context * Get the {@link MergedContextConfiguration} for the parent application context
* in a context hierarchy. * in a context hierarchy.
* @return the parent configuration or {@code null} if there is no parent * @return the parent configuration or {@code null} if there is no parent
* @see #getParentApplicationContext()
* @since 3.2.2 * @since 3.2.2
* @see #getParentApplicationContext()
*/ */
@Nullable @Nullable
public MergedContextConfiguration getParent() { public MergedContextConfiguration getParent() {
@ -386,8 +386,8 @@ public class MergedContextConfiguration implements Serializable {
* <p>If the parent context has not yet been loaded, it will be loaded, stored * <p>If the parent context has not yet been loaded, it will be loaded, stored
* in the cache, and then returned. * in the cache, and then returned.
* @return the parent {@code ApplicationContext} or {@code null} if there is no parent * @return the parent {@code ApplicationContext} or {@code null} if there is no parent
* @see #getParent()
* @since 3.2.2 * @since 3.2.2
* @see #getParent()
*/ */
@Nullable @Nullable
public ApplicationContext getParentApplicationContext() { public ApplicationContext getParentApplicationContext() {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -174,8 +174,8 @@ class MergedSqlConfig {
/** /**
* Get the prefixes that identify single-line comments within the SQL scripts. * Get the prefixes that identify single-line comments within the SQL scripts.
* @see SqlConfig#commentPrefixes()
* @since 5.2 * @since 5.2
* @see SqlConfig#commentPrefixes()
*/ */
String[] getCommentPrefixes() { String[] getCommentPrefixes() {
return this.commentPrefixes; return this.commentPrefixes;

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -77,10 +77,10 @@ public class ProfileValueChecker extends Statement {
* <p>If a test is not enabled, this method will abort further evaluation * <p>If a test is not enabled, this method will abort further evaluation
* of the execution chain with a failed assumption; otherwise, this method * of the execution chain with a failed assumption; otherwise, this method
* will simply evaluate the next {@link Statement} in the execution chain. * 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 AssumptionViolatedException if the test is disabled
* @throws Throwable if evaluation of the next statement fails * @throws Throwable if evaluation of the next statement fails
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class)
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Method, Class)
*/ */
@Override @Override
public void evaluate() throws Throwable { public void evaluate() throws Throwable {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -97,9 +97,9 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* context and registers a JVM shutdown hook for it.</li> * context and registers a JVM shutdown hook for it.</li>
* </ul> * </ul>
* @return a new application context * @return a new application context
* @since 3.1
* @see org.springframework.test.context.SmartContextLoader#loadContext(MergedContextConfiguration) * @see org.springframework.test.context.SmartContextLoader#loadContext(MergedContextConfiguration)
* @see GenericApplicationContext * @see GenericApplicationContext
* @since 3.1
*/ */
@Override @Override
public final ConfigurableApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception { public final ConfigurableApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception {
@ -170,10 +170,10 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* and {@link AbstractContextLoader#prepareContext(ConfigurableApplicationContext, MergedContextConfiguration)} * and {@link AbstractContextLoader#prepareContext(ConfigurableApplicationContext, MergedContextConfiguration)}
* for an alternative. * for an alternative.
* @return a new application context * @return a new application context
* @since 2.5
* @see org.springframework.test.context.ContextLoader#loadContext * @see org.springframework.test.context.ContextLoader#loadContext
* @see GenericApplicationContext * @see GenericApplicationContext
* @see #loadContext(MergedContextConfiguration) * @see #loadContext(MergedContextConfiguration)
* @since 2.5
*/ */
@Override @Override
public final ConfigurableApplicationContext loadContext(String... locations) throws Exception { public final ConfigurableApplicationContext loadContext(String... locations) throws Exception {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -61,8 +61,8 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
* {@code GenericGroovyXmlContextLoader} supports both Groovy and XML * {@code GenericGroovyXmlContextLoader} supports both Groovy and XML
* resource types for detection of defaults. Consequently, this method * resource types for detection of defaults. Consequently, this method
* is not supported. * is not supported.
* @see #getResourceSuffixes()
* @throws UnsupportedOperationException in this implementation * @throws UnsupportedOperationException in this implementation
* @see #getResourceSuffixes()
*/ */
@Override @Override
protected String getResourceSuffix() { protected String getResourceSuffix() {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -260,8 +260,8 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}, * {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}. * not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported. * Consequently, this method is not supported.
* @see org.springframework.test.context.ContextLoader#loadContext(java.lang.String[])
* @throws UnsupportedOperationException in this implementation * @throws UnsupportedOperationException in this implementation
* @see org.springframework.test.context.ContextLoader#loadContext(java.lang.String[])
*/ */
@Override @Override
public final ApplicationContext loadContext(String... locations) throws Exception { public final ApplicationContext loadContext(String... locations) throws Exception {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -61,8 +61,8 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
* {@code GenericGroovyXmlWebContextLoader} supports both Groovy and XML * {@code GenericGroovyXmlWebContextLoader} supports both Groovy and XML
* resource types for detection of defaults. Consequently, this method * resource types for detection of defaults. Consequently, this method
* is not supported. * is not supported.
* @see #getResourceSuffixes()
* @throws UnsupportedOperationException in this implementation * @throws UnsupportedOperationException in this implementation
* @see #getResourceSuffixes()
*/ */
@Override @Override
protected String getResourceSuffix() { protected String getResourceSuffix() {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -390,8 +390,8 @@ public class StatusResultMatchers {
/** /**
* Assert the response status code is {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE} (413). * Assert the response status code is {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE} (413).
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE}
* @see #isPayloadTooLarge() * @see #isPayloadTooLarge()
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE}
*/ */
@Deprecated @Deprecated
public ResultMatcher isRequestEntityTooLarge() { public ResultMatcher isRequestEntityTooLarge() {
@ -408,8 +408,8 @@ public class StatusResultMatchers {
/** /**
* Assert the response status code is {@code HttpStatus.REQUEST_URI_TOO_LONG} (414). * Assert the response status code is {@code HttpStatus.REQUEST_URI_TOO_LONG} (414).
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_URI_TOO_LONG}
* @see #isUriTooLong() * @see #isUriTooLong()
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_URI_TOO_LONG}
*/ */
@Deprecated @Deprecated
public ResultMatcher isRequestUriTooLong() { public ResultMatcher isRequestUriTooLong() {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -32,8 +32,8 @@ import org.springframework.transaction.ReactiveTransaction;
* @author Mark Paluch * @author Mark Paluch
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 5.2 * @since 5.2
* @see TransactionalOperator
* @param <T> the result type * @param <T> the result type
* @see TransactionalOperator
*/ */
@FunctionalInterface @FunctionalInterface
public interface TransactionCallback<T> { public interface TransactionCallback<T> {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -30,9 +30,9 @@ import org.springframework.transaction.TransactionStatus;
* *
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 17.03.2003 * @since 17.03.2003
* @param <T> the result type
* @see TransactionTemplate * @see TransactionTemplate
* @see CallbackPreferringPlatformTransactionManager * @see CallbackPreferringPlatformTransactionManager
* @param <T> the result type
*/ */
@FunctionalInterface @FunctionalInterface
public interface TransactionCallback<T> { public interface TransactionCallback<T> {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -230,20 +230,20 @@ public class MediaType extends MimeType implements Serializable {
/** /**
* Public constant media type for {@code application/stream+json}. * Public constant media type for {@code application/stream+json}.
* @deprecated as of 5.3, see notice on {@link #APPLICATION_STREAM_JSON_VALUE}.
* @since 5.0 * @since 5.0
* @deprecated as of 5.3, see notice on {@link #APPLICATION_STREAM_JSON_VALUE}.
*/ */
@Deprecated @Deprecated
public static final MediaType APPLICATION_STREAM_JSON; public static final MediaType APPLICATION_STREAM_JSON;
/** /**
* A String equivalent of {@link MediaType#APPLICATION_STREAM_JSON}. * A String equivalent of {@link MediaType#APPLICATION_STREAM_JSON}.
* @since 5.0
* @deprecated as of 5.3 since it originates from the W3C Activity Streams * @deprecated as of 5.3 since it originates from the W3C Activity Streams
* specification which has a more specific purpose and has been since * specification which has a more specific purpose and has been since
* replaced with a different mime type. Use {@link #APPLICATION_NDJSON} as * replaced with a different mime type. Use {@link #APPLICATION_NDJSON} as
* a replacement or any other line-delimited JSON format (e.g. JSON Lines, * a replacement or any other line-delimited JSON format (e.g. JSON Lines,
* JSON Text Sequences). * JSON Text Sequences).
* @since 5.0
*/ */
@Deprecated @Deprecated
public static final String APPLICATION_STREAM_JSON_VALUE = "application/stream+json"; public static final String APPLICATION_STREAM_JSON_VALUE = "application/stream+json";

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -120,8 +120,8 @@ public final class ResponseCookie extends HttpCookie {
* Return the cookie "SameSite" attribute, or {@code null} if not set. * Return the cookie "SameSite" attribute, or {@code null} if not set.
* <p>This limits the scope of the cookie such that it will only be attached to * <p>This limits the scope of the cookie such that it will only be attached to
* same site requests if {@code "Strict"} or cross-site requests if {@code "Lax"}. * same site requests if {@code "Strict"} or cross-site requests if {@code "Lax"}.
* @see <a href="https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis#section-4.1.2.7">RFC6265 bis</a>
* @since 5.1 * @since 5.1
* @see <a href="https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis#section-4.1.2.7">RFC6265 bis</a>
*/ */
@Nullable @Nullable
public String getSameSite() { public String getSameSite() {

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,8 +27,8 @@ import java.io.IOException;
* application code. * application code.
* *
* @author Arjen Poutsma * @author Arjen Poutsma
* @see org.springframework.web.client.AsyncRestTemplate#execute
* @since 4.0 * @since 4.0
* @see org.springframework.web.client.AsyncRestTemplate#execute
* @deprecated as of Spring 5.0, in favor of * @deprecated as of Spring 5.0, in favor of
* {@link org.springframework.web.reactive.function.client.ExchangeFilterFunction} * {@link org.springframework.web.reactive.function.client.ExchangeFilterFunction}
*/ */

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -34,8 +34,8 @@ import org.springframework.http.client.ClientHttpRequest;
* </ul> * </ul>
* *
* @author Arjen Poutsma * @author Arjen Poutsma
* @see RestTemplate#execute
* @since 3.0 * @since 3.0
* @see RestTemplate#execute
*/ */
@FunctionalInterface @FunctionalInterface
public interface RequestCallback { public interface RequestCallback {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -34,13 +34,13 @@ import org.springframework.web.server.adapter.ForwardedHeaderTransformer;
* *
* @author Arjen Poutsma * @author Arjen Poutsma
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
* @deprecated as of 5.1 this filter is deprecated in favor of using * @deprecated as of 5.1 this filter is deprecated in favor of using
* {@link ForwardedHeaderTransformer} which can be declared as a bean with the * {@link ForwardedHeaderTransformer} which can be declared as a bean with the
* name "forwardedHeaderTransformer" or registered explicitly in * name "forwardedHeaderTransformer" or registered explicitly in
* {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder * {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder
* WebHttpHandlerBuilder}. * WebHttpHandlerBuilder}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
*/ */
@Deprecated @Deprecated
public class ForwardedHeaderFilter extends ForwardedHeaderTransformer implements WebFilter { public class ForwardedHeaderFilter extends ForwardedHeaderTransformer implements WebFilter {

View File

@ -469,10 +469,10 @@ public interface WebClient {
/** /**
* Provide a function to populate the Reactor {@code Context}. * Provide a function to populate the Reactor {@code Context}.
* @param contextModifier the function to modify the context with * @param contextModifier the function to modify the context with
* @since 5.3.1
* @deprecated in 5.3.2 to be removed soon after; this method cannot * @deprecated in 5.3.2 to be removed soon after; this method cannot
* provide context to downstream (nested or subsequent) requests and is * provide context to downstream (nested or subsequent) requests and is
* of limited value. * of limited value.
* @since 5.3.1
*/ */
@Deprecated @Deprecated
S context(Function<Context, Context> contextModifier); S context(Function<Context, Context> contextModifier);

View File

@ -70,9 +70,9 @@ public interface HandlerAdapter {
* @param handler the handler to use. This object must have previously been passed * @param handler the handler to use. This object must have previously been passed
* to the {@code supports} method of this interface, which must have * to the {@code supports} method of this interface, which must have
* returned {@code true}. * returned {@code true}.
* @throws Exception in case of errors
* @return a ModelAndView object with the name of the view and the required * @return a ModelAndView object with the name of the view and the required
* model data, or {@code null} if the request has been handled directly * model data, or {@code null} if the request has been handled directly
* @throws Exception in case of errors
*/ */
@Nullable @Nullable
ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception; ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception;

View File

@ -34,16 +34,16 @@ import javax.servlet.http.HttpServletRequest;
* *
* @author Rod Johnson * @author Rod Johnson
* @author Juergen Hoeller * @author Juergen Hoeller
* @deprecated as of 5.3.9 in favor of using the {@code checkNotModified} methods
* in {@link org.springframework.web.context.request.WebRequest}, or from an
* annotated controller method, returning a
* {@link org.springframework.http.ResponseEntity} with an "ETag" and/or
* "Last-Modified" headers set.
* @see javax.servlet.http.HttpServlet#getLastModified * @see javax.servlet.http.HttpServlet#getLastModified
* @see Controller * @see Controller
* @see SimpleControllerHandlerAdapter * @see SimpleControllerHandlerAdapter
* @see org.springframework.web.HttpRequestHandler * @see org.springframework.web.HttpRequestHandler
* @see HttpRequestHandlerAdapter * @see HttpRequestHandlerAdapter
* @deprecated as of 5.3.9 in favor of using the {@code checkNotModified} methods
* in {@link org.springframework.web.context.request.WebRequest}, or from an
* annotated controller method, returning a
* {@link org.springframework.http.ResponseEntity} with an "ETag" and/or
* "Last-Modified" headers set.
*/ */
@Deprecated @Deprecated
public interface LastModified { public interface LastModified {

View File

@ -912,9 +912,9 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
/** /**
* Set a custom UrlPathHelper to use for the PatternsRequestCondition. * Set a custom UrlPathHelper to use for the PatternsRequestCondition.
* <p>By default this is not set. * <p>By default this is not set.
* @since 4.2.8
* @deprecated as of 5.3, the path is resolved externally and obtained with * @deprecated as of 5.3, the path is resolved externally and obtained with
* {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)} * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)}
* @since 4.2.8
*/ */
@Deprecated @Deprecated
public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) { public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -168,10 +168,10 @@ public class DefaultRequestToViewNameTranslator implements RequestToViewNameTran
/** /**
* Translates the request URI of the incoming {@link HttpServletRequest} * Translates the request URI of the incoming {@link HttpServletRequest}
* into the view name based on the configured parameters. * into the view name based on the configured parameters.
* @see ServletRequestPathUtils#getCachedPath(ServletRequest)
* @see #transformPath
* @throws IllegalArgumentException if neither a parsed RequestPath, nor a * @throws IllegalArgumentException if neither a parsed RequestPath, nor a
* String lookupPath have been resolved and cached as a request attribute. * String lookupPath have been resolved and cached as a request attribute.
* @see ServletRequestPathUtils#getCachedPath(ServletRequest)
* @see #transformPath
*/ */
@Override @Override
public String getViewName(HttpServletRequest request) { public String getViewName(HttpServletRequest request) {

View File

@ -160,7 +160,7 @@
</module> </module>
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck"> <module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck">
<property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> <property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
<property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/> <property name="tagOrder" value="@param, @return, @throws, @since, @see, @deprecated"/>
</module> </module>
<!-- Miscellaneous --> <!-- Miscellaneous -->