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

@@ -68,8 +68,8 @@ public class MockCookie extends 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
* @since 5.1.11
*/
@Nullable
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");
* 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
* {@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() {

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");
* 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
* 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() {
@@ -386,8 +386,8 @@ public class MergedContextConfiguration implements Serializable {
* <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() {

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.
@@ -174,8 +174,8 @@ class MergedSqlConfig {
/**
* 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;

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");
* 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
* 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 {

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.
@@ -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 {
@@ -170,10 +170,10 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* 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 {

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.
@@ -61,8 +61,8 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
* {@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() {

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.
@@ -260,8 +260,8 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
* {@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 {

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.
@@ -61,8 +61,8 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
* {@code GenericGroovyXmlWebContextLoader} 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() {

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.
@@ -390,8 +390,8 @@ public class StatusResultMatchers {
/**
* 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()
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE}
*/
@Deprecated
public ResultMatcher isRequestEntityTooLarge() {
@@ -408,8 +408,8 @@ public class StatusResultMatchers {
/**
* 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()
* @deprecated matching the deprecation of {@code HttpStatus.REQUEST_URI_TOO_LONG}
*/
@Deprecated
public ResultMatcher isRequestUriTooLong() {