Sort methods to align with PropertySource declaration order

See gh-34861
This commit is contained in:
Sam Brannen
2025-05-11 15:48:00 +02:00
parent 065e50a444
commit 49ffb833a3

View File

@@ -232,6 +232,16 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
}
@Override
public boolean containsProperty(String name) {
for (PropertySource<?> propertySource : super.source.getPropertySources()) {
if (propertySource.containsProperty(name)) {
return true;
}
}
return false;
}
@Override
@Nullable
public Object getProperty(String name) {
@@ -244,16 +254,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
return null;
}
@Override
public boolean containsProperty(String name) {
for (PropertySource<?> propertySource : super.source.getPropertySources()) {
if (propertySource.containsProperty(name)) {
return true;
}
}
return false;
}
@Override
public String toString() {
return "ConfigurableEnvironmentPropertySource {propertySources=" + super.source.getPropertySources() + "}";
@@ -274,14 +274,14 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
@Override
@Nullable
public Object getProperty(String name) {
return super.source.getProperty(name);
public boolean containsProperty(String name) {
return super.source.containsProperty(name);
}
@Override
public boolean containsProperty(String name) {
return super.source.containsProperty(name);
@Nullable
public Object getProperty(String name) {
return super.source.getProperty(name);
}
@Override