Merge branch '6.0.x'

This commit is contained in:
Juergen Hoeller
2023-08-04 02:40:17 +02:00
56 changed files with 198 additions and 288 deletions

View File

@@ -47,7 +47,6 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
private static final String PROPERTY_SOURCE_NAME = "Dynamic Test Properties";
private final Set<Method> methods;
@@ -66,9 +65,7 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
}
@Override
public void customizeContext(ConfigurableApplicationContext context,
MergedContextConfiguration mergedConfig) {
public void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
MutablePropertySources sources = context.getEnvironment().getPropertySources();
sources.addFirst(new DynamicValuesPropertySource(PROPERTY_SOURCE_NAME, buildDynamicPropertiesMap()));
}
@@ -91,20 +88,16 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
return this.methods;
}
@Override
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof DynamicPropertiesContextCustomizer that &&
this.methods.equals(that.methods)));
}
@Override
public int hashCode() {
return this.methods.hashCode();
}
@Override
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return this.methods.equals(((DynamicPropertiesContextCustomizer) obj).methods);
}
}