Merge branch '3.1.x'

Closes gh-37144
This commit is contained in:
Andy Wilkinson 2023-08-30 13:36:01 +01:00
commit f6c88662b4
8 changed files with 10 additions and 16 deletions

View File

@ -99,7 +99,7 @@ public abstract class AbstractReactiveHealthIndicator implements ReactiveHealthI
}
/**
* Actual health check logic. If an error occurs in the pipeline it will be handled
* Actual health check logic. If an error occurs in the pipeline, it will be handled
* automatically.
* @param builder the {@link Health.Builder} to report health status and details
* @return a {@link Mono} that provides the {@link Health}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2023 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.
@ -119,8 +119,7 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
return false;
}
AnnotationCustomizableTypeExcludeFilter other = (AnnotationCustomizableTypeExcludeFilter) obj;
boolean result = true;
result = result && hasAnnotation() == other.hasAnnotation();
boolean result = hasAnnotation() == other.hasAnnotation();
for (FilterType filterType : FilterType.values()) {
result &= ObjectUtils.nullSafeEquals(getFilters(filterType), other.getFilters(filterType));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2023 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.
@ -58,7 +58,7 @@ public @interface AutoConfigureTestDatabase {
/**
* The type of connection to be established when {@link #replace() replacing} the
* DataSource. By default will attempt to detect the connection based on the
* DataSource. By default, will attempt to detect the connection based on the
* classpath.
* @return the type of connection to use
*/

View File

@ -163,11 +163,6 @@ public class TestDatabaseAutoConfiguration {
return EmbeddedDatabase.class;
}
@Override
public boolean isSingleton() {
return true;
}
}
static class EmbeddedDataSourceFactory {

View File

@ -91,7 +91,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
return;
}
Optional<Object> value = annotation.getValue(attribute.getName());
if (!value.isPresent()) {
if (value.isEmpty()) {
return;
}
if (skip == SkipPropertyMapping.ON_DEFAULT_VALUE) {

View File

@ -98,7 +98,7 @@ class PropertyMappingContextCustomizer implements ContextCustomizer {
private String getAnnotationsDescription(Set<Class<?>> annotations) {
StringBuilder result = new StringBuilder();
for (Class<?> annotation : annotations) {
if (result.length() != 0) {
if (!result.isEmpty()) {
result.append(", ");
}
result.append('@').append(ClassUtils.getShortName(annotation));

View File

@ -107,7 +107,7 @@ public class WebDriverScope implements Scope {
/**
* Register this scope with the specified context and reassign appropriate bean
* definitions to used it.
* definitions to use it.
* @param context the application context
*/
static void registerWith(ConfigurableApplicationContext context) {

View File

@ -570,8 +570,8 @@ public class SpringApplication {
}
/**
* Apply any relevant post processing the {@link ApplicationContext}. Subclasses can
* apply additional processing as required.
* Apply any relevant post-processing to the {@link ApplicationContext}. Subclasses
* can apply additional processing as required.
* @param context the application context
*/
protected void postProcessApplicationContext(ConfigurableApplicationContext context) {