Skip to content

Commit 74f4a07

Browse files
committed
Merge branch '6.2.x'
2 parents c28b22b + 7135527 commit 74f4a07

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,14 @@ public PropertySources getAppliedPropertySources() throws IllegalStateException
225225
*/
226226
private static class ConfigurableEnvironmentPropertySource extends PropertySource<ConfigurableEnvironment> {
227227

228-
private final PropertySources propertySources;
229-
230-
231228
ConfigurableEnvironmentPropertySource(ConfigurableEnvironment environment) {
232229
super(ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, environment);
233-
this.propertySources = environment.getPropertySources();
234230
}
235231

236232

237233
@Override
238234
public @Nullable Object getProperty(String name) {
239-
for (PropertySource<?> propertySource : this.propertySources) {
235+
for (PropertySource<?> propertySource : super.source.getPropertySources()) {
240236
Object candidate = propertySource.getProperty(name);
241237
if (candidate != null) {
242238
return candidate;
@@ -247,7 +243,7 @@ private static class ConfigurableEnvironmentPropertySource extends PropertySourc
247243

248244
@Override
249245
public boolean containsProperty(String name) {
250-
for (PropertySource<?> propertySource : this.propertySources) {
246+
for (PropertySource<?> propertySource : super.source.getPropertySources()) {
251247
if (propertySource.containsProperty(name)) {
252248
return true;
253249
}
@@ -257,7 +253,7 @@ public boolean containsProperty(String name) {
257253

258254
@Override
259255
public String toString() {
260-
return "ConfigurableEnvironmentPropertySource {propertySources=" + this.propertySources + "}";
256+
return "ConfigurableEnvironmentPropertySource {propertySources=" + super.source.getPropertySources() + "}";
261257
}
262258
}
263259

0 commit comments

Comments
 (0)