Merge branch '3.2.x'

Closes gh-39093
This commit is contained in:
Andy Wilkinson
2024-01-11 11:25:26 +00:00
151 changed files with 354 additions and 349 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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,7 +390,7 @@ public class AutoConfigurationImportSelector implements DeferredImportSelector,
}
private static class AutoConfigurationGroup
private static final class AutoConfigurationGroup
implements DeferredImportSelector.Group, BeanClassLoaderAware, BeanFactoryAware, ResourceLoaderAware {
private final Map<String, AnnotationMetadata> entries = new LinkedHashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -139,7 +139,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
/**
* Early initializer for Spring MessageConverters.
*/
private static class MessageConverterInitializer implements Runnable {
private static final class MessageConverterInitializer implements Runnable {
@Override
public void run() {
@@ -151,7 +151,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
/**
* Early initializer for jakarta.validation.
*/
private static class ValidationInitializer implements Runnable {
private static final class ValidationInitializer implements Runnable {
@Override
public void run() {
@@ -164,7 +164,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
/**
* Early initializer for Jackson.
*/
private static class JacksonInitializer implements Runnable {
private static final class JacksonInitializer implements Runnable {
@Override
public void run() {
@@ -176,7 +176,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
/**
* Early initializer for Spring's ConversionService.
*/
private static class ConversionServiceInitializer implements Runnable {
private static final class ConversionServiceInitializer implements Runnable {
@Override
public void run() {
@@ -185,7 +185,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
}
private static class CharsetInitializer implements Runnable {
private static final class CharsetInitializer implements Runnable {
@Override
public void run() {
@@ -194,7 +194,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
}
private static class TomcatInitializer implements Runnable {
private static final class TomcatInitializer implements Runnable {
@Override
public void run() {
@@ -204,7 +204,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
}
private static class JdkInitializer implements Runnable {
private static final class JdkInitializer implements Runnable {
@Override
public void run() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -277,7 +277,7 @@ public class CassandraAutoConfiguration {
return connectionDetails.getContactPoints().stream().map((node) -> node.host() + ":" + node.port()).toList();
}
private static class CassandraDriverOptions {
private static final class CassandraDriverOptions {
private final Map<String, String> options = new LinkedHashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -291,7 +291,7 @@ public final class ConditionEvaluationReport {
}
private static class AncestorsMatchedCondition implements Condition {
private static final class AncestorsMatchedCondition implements Condition {
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class CassandraReactiveRepositoriesRegistrar extends AbstractRepositoryConfigura
}
@EnableReactiveCassandraRepositories
private static class EnableReactiveCassandraRepositoriesConfiguration {
private static final class EnableReactiveCassandraRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class CassandraRepositoriesRegistrar extends AbstractRepositoryConfigurationSour
}
@EnableCassandraRepositories
private static class EnableCassandraRepositoriesConfiguration {
private static final class EnableCassandraRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class CouchbaseReactiveRepositoriesRegistrar extends AbstractRepositoryConfigura
}
@EnableReactiveCouchbaseRepositories
private static class EnableReactiveCouchbaseRepositoriesConfiguration {
private static final class EnableReactiveCouchbaseRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class CouchbaseRepositoriesRegistrar extends AbstractRepositoryConfigurationSour
}
@EnableCouchbaseRepositories
private static class EnableCouchbaseRepositoriesConfiguration {
private static final class EnableCouchbaseRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -49,7 +49,7 @@ class ElasticsearchRepositoriesRegistrar extends AbstractRepositoryConfiguration
}
@EnableElasticsearchRepositories
private static class EnableElasticsearchRepositoriesConfiguration {
private static final class EnableElasticsearchRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class ReactiveElasticsearchRepositoriesRegistrar extends AbstractRepositoryConfi
}
@EnableReactiveElasticsearchRepositories
private static class EnableElasticsearchRepositoriesConfiguration {
private static final class EnableElasticsearchRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class JdbcRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSup
}
@EnableJdbcRepositories
private static class EnableJdbcRepositoriesConfiguration {
private static final class EnableJdbcRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2024 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.
@@ -34,7 +34,7 @@ class EnversRevisionRepositoriesRegistrar extends JpaRepositoriesRegistrar {
}
@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
private static class EnableJpaRepositoriesConfiguration {
private static final class EnableJpaRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 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.
@@ -74,7 +74,7 @@ class JpaRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSupp
}
@EnableJpaRepositories
private static class EnableJpaRepositoriesConfiguration {
private static final class EnableJpaRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class LdapRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSup
}
@EnableLdapRepositories
private static class EnableLdapRepositoriesConfiguration {
private static final class EnableLdapRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class MongoReactiveRepositoriesRegistrar extends AbstractRepositoryConfiguration
}
@EnableReactiveMongoRepositories
private static class EnableReactiveMongoRepositoriesConfiguration {
private static final class EnableReactiveMongoRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class MongoRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSu
}
@EnableMongoRepositories
private static class EnableMongoRepositoriesConfiguration {
private static final class EnableMongoRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class Neo4jReactiveRepositoriesRegistrar extends AbstractRepositoryConfiguration
}
@EnableReactiveNeo4jRepositories
private static class EnableReactiveNeo4jRepositoriesConfiguration {
private static final class EnableReactiveNeo4jRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class Neo4jRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSu
}
@EnableNeo4jRepositories
private static class EnableNeo4jRepositoriesConfiguration {
private static final class EnableNeo4jRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class R2dbcRepositoriesAutoConfigureRegistrar extends AbstractRepositoryConfigur
}
@EnableR2dbcRepositories
private static class EnableR2dbcRepositoriesConfiguration {
private static final class EnableR2dbcRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -212,7 +212,7 @@ class LettuceConnectionConfiguration extends RedisConnectionConfiguration {
/**
* Inner class to allow optional commons-pool2 dependency.
*/
private static class PoolBuilderFactory {
private static final class PoolBuilderFactory {
LettuceClientConfigurationBuilder createBuilder(Pool properties) {
return LettucePoolingClientConfiguration.builder().poolConfig(getPoolConfig(properties));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ class RedisRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSu
}
@EnableRedisRepositories
private static class EnableRedisRepositoriesConfiguration {
private static final class EnableRedisRepositoriesConfiguration {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 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.
@@ -94,7 +94,7 @@ public class HttpMessageConvertersAutoConfiguration {
}
@ConditionalOnWebApplication(type = Type.REACTIVE)
private static class ReactiveWebApplication {
private static final class ReactiveWebApplication {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 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.
@@ -59,7 +59,7 @@ class IntegrationAutoConfigurationScanRegistrar extends IntegrationComponentScan
}
@IntegrationComponentScan
private static class IntegrationComponentScanConfiguration {
private static final class IntegrationComponentScanConfiguration {
}

View File

@@ -1736,7 +1736,7 @@ public class KafkaProperties {
}
@SuppressWarnings("serial")
private static class Properties extends HashMap<String, Object> {
private static final class Properties extends HashMap<String, Object> {
<V> java.util.function.Consumer<V> in(String key) {
return (value) -> put(key, value);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -153,7 +153,7 @@ public class TemplateAvailabilityProviders {
return null;
}
private static class NoTemplateAvailabilityProvider implements TemplateAvailabilityProvider {
private static final class NoTemplateAvailabilityProvider implements TemplateAvailabilityProvider {
@Override
public boolean isTemplateAvailable(String view, Environment environment, ClassLoader classLoader,

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -33,7 +33,7 @@ class NotReactiveWebApplicationCondition extends NoneNestedConditions {
}
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
private static class ReactiveWebApplication {
private static final class ReactiveWebApplication {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -342,7 +342,7 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept
return response.writeTo(exchange, new ResponseContext());
}
private class ResponseContext implements ServerResponse.Context {
private final class ResponseContext implements ServerResponse.Context {
@Override
public List<HttpMessageWriter<?>> messageWriters() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -133,7 +133,7 @@ public class DispatcherServletAutoConfiguration {
}
@Order(Ordered.LOWEST_PRECEDENCE - 10)
private static class DefaultDispatcherServletCondition extends SpringBootCondition {
private static final class DefaultDispatcherServletCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
@@ -160,7 +160,7 @@ public class DispatcherServletAutoConfiguration {
}
@Order(Ordered.LOWEST_PRECEDENCE - 10)
private static class DispatcherServletRegistrationCondition extends SpringBootCondition {
private static final class DispatcherServletRegistrationCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -169,7 +169,7 @@ public class ErrorMvcAutoConfiguration {
/**
* {@link SpringBootCondition} that matches when no error template view is detected.
*/
private static class ErrorTemplateMissingCondition extends SpringBootCondition {
private static final class ErrorTemplateMissingCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
@@ -188,7 +188,7 @@ public class ErrorMvcAutoConfiguration {
/**
* Simple {@link View} implementation that writes a default HTML error page.
*/
private static class StaticView implements View {
private static final class StaticView implements View {
private static final MediaType TEXT_HTML_UTF8 = new MediaType("text", "html", StandardCharsets.UTF_8);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
@@ -44,7 +44,7 @@ public class UndertowWebSocketServletWebServerCustomizer
return 0;
}
private static class WebsocketDeploymentInfoCustomizer implements UndertowDeploymentInfoCustomizer {
private static final class WebsocketDeploymentInfoCustomizer implements UndertowDeploymentInfoCustomizer {
@Override
public void customize(DeploymentInfo deploymentInfo) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -216,7 +216,7 @@ class AutoConfigurationImportSelectorTests {
return ImportCandidates.load(AutoConfiguration.class, getClass().getClassLoader()).getCandidates();
}
private class TestAutoConfigurationImportSelector extends AutoConfigurationImportSelector {
private final class TestAutoConfigurationImportSelector extends AutoConfigurationImportSelector {
private AutoConfigurationImportEvent lastEvent;
@@ -269,54 +269,54 @@ class AutoConfigurationImportSelectorTests {
}
@Configuration(proxyBeanMethods = false)
private class TestConfiguration {
private final class TestConfiguration {
}
@EnableAutoConfiguration
private class BasicEnableAutoConfiguration {
private final class BasicEnableAutoConfiguration {
}
@EnableAutoConfiguration(exclude = FreeMarkerAutoConfiguration.class)
private class EnableAutoConfigurationWithClassExclusions {
private final class EnableAutoConfigurationWithClassExclusions {
}
@SpringBootApplication(exclude = FreeMarkerAutoConfiguration.class)
private class SpringBootApplicationWithClassExclusions {
private final class SpringBootApplicationWithClassExclusions {
}
@EnableAutoConfiguration(excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
private class EnableAutoConfigurationWithClassNameExclusions {
private final class EnableAutoConfigurationWithClassNameExclusions {
}
@EnableAutoConfiguration(exclude = MustacheAutoConfiguration.class,
excludeName = "org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration")
private class EnableAutoConfigurationWithClassAndClassNameExclusions {
private final class EnableAutoConfigurationWithClassAndClassNameExclusions {
}
@EnableAutoConfiguration(exclude = TestConfiguration.class)
private class EnableAutoConfigurationWithFaultyClassExclude {
private final class EnableAutoConfigurationWithFaultyClassExclude {
}
@EnableAutoConfiguration(
excludeName = "org.springframework.boot.autoconfigure.AutoConfigurationImportSelectorTests.TestConfiguration")
private class EnableAutoConfigurationWithFaultyClassNameExclude {
private final class EnableAutoConfigurationWithFaultyClassNameExclude {
}
@EnableAutoConfiguration(excludeName = "org.springframework.boot.autoconfigure.DoesNotExist1")
private class EnableAutoConfigurationWithAbsentClassNameExclude {
private final class EnableAutoConfigurationWithAbsentClassNameExclude {
}
@SpringBootApplication(excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
private class SpringBootApplicationWithClassNameExclusions {
private final class SpringBootApplicationWithClassNameExclusions {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
@@ -405,7 +405,7 @@ class R2dbcAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
private static class CustomizerConfiguration {
private static final class CustomizerConfiguration {
@Bean
ConnectionFactoryOptionsBuilderCustomizer customizer() {

View File

@@ -165,7 +165,7 @@ class FileWatcherTests {
}
}
private static class WaitingCallback implements Runnable {
private static final class WaitingCallback implements Runnable {
private final CountDownLatch latch = new CountDownLatch(1);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2024 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.
@@ -52,7 +52,7 @@ class ScheduledBeanLazyInitializationExcludeFilterTests {
return this.filter.isExcluded("test", new RootBeanDefinition(type), type);
}
private static class TestBean {
private static final class TestBean {
@Scheduled
void doStuff() {
@@ -60,7 +60,7 @@ class ScheduledBeanLazyInitializationExcludeFilterTests {
}
private static class AnotherTestBean {
private static final class AnotherTestBean {
@Schedules({ @Scheduled(fixedRate = 5000), @Scheduled(fixedRate = 2500) })
void doStuff() {