From 6a9444473f1aad080bf659563e56cc2bbd8f9512 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 13 May 2025 16:08:03 +0200 Subject: [PATCH 1/3] Clarify CompositePropertySource behavior for EnumerablePropertySource contract Closes gh-34886 --- .../springframework/core/env/CompositePropertySource.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/env/CompositePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/CompositePropertySource.java index 5fe8115842c..56f47247c92 100644 --- a/spring-core/src/main/java/org/springframework/core/env/CompositePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/CompositePropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 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,10 @@ import org.springframework.util.StringUtils; * *

As of Spring 4.1.2, this class extends {@link EnumerablePropertySource} instead * of plain {@link PropertySource}, exposing {@link #getPropertyNames()} based on the - * accumulated property names from all contained sources (as far as possible). + * accumulated property names from all contained sources - and failing with an + * {@code IllegalStateException} against any non-{@code EnumerablePropertySource}. + * When used through the {@code EnumerablePropertySource} contract, all contained + * sources are expected to be of type {@code EnumerablePropertySource} as well. * * @author Chris Beams * @author Juergen Hoeller From 4d296fb4ca1b3f87fe4b9cd97132f2688533de2d Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 13 May 2025 16:08:31 +0200 Subject: [PATCH 2/3] Upgrade to Micrometer 1.14.7 Includes Jackson 2.18.4, Jetty 12.0.21, Netty 4.1.121, Apache HttpClient 5.4.4, Checkstyle 10.23.1 Closes gh-34889 --- .../springframework/build/CheckstyleConventions.java | 2 +- framework-platform/framework-platform.gradle | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java b/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java index 4216ae6fa21..b35b3e3b5df 100644 --- a/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java +++ b/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java @@ -50,7 +50,7 @@ public class CheckstyleConventions { project.getPlugins().apply(CheckstylePlugin.class); project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g")); CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class); - checkstyle.setToolVersion("10.23.0"); + checkstyle.setToolVersion("10.23.1"); checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle")); String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion(); DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies(); diff --git a/framework-platform/framework-platform.gradle b/framework-platform/framework-platform.gradle index a057d3beb16..be56d998cbb 100644 --- a/framework-platform/framework-platform.gradle +++ b/framework-platform/framework-platform.gradle @@ -7,17 +7,17 @@ javaPlatform { } dependencies { - api(platform("com.fasterxml.jackson:jackson-bom:2.18.3")) - api(platform("io.micrometer:micrometer-bom:1.14.5")) - api(platform("io.netty:netty-bom:4.1.119.Final")) + api(platform("com.fasterxml.jackson:jackson-bom:2.18.4")) + api(platform("io.micrometer:micrometer-bom:1.14.7")) + api(platform("io.netty:netty-bom:4.1.121.Final")) api(platform("io.netty:netty5-bom:5.0.0.Alpha5")) api(platform("io.projectreactor:reactor-bom:2024.0.4")) api(platform("io.rsocket:rsocket-bom:1.1.5")) api(platform("org.apache.groovy:groovy-bom:4.0.26")) api(platform("org.apache.logging.log4j:log4j-bom:2.21.1")) api(platform("org.assertj:assertj-bom:3.27.3")) - api(platform("org.eclipse.jetty:jetty-bom:12.0.18")) - api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.18")) + api(platform("org.eclipse.jetty:jetty-bom:12.0.21")) + api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.21")) api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1")) api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3")) api(platform("org.junit:junit-bom:5.12.2")) @@ -100,7 +100,7 @@ dependencies { api("org.apache.derby:derby:10.16.1.1") api("org.apache.derby:derbyclient:10.16.1.1") api("org.apache.derby:derbytools:10.16.1.1") - api("org.apache.httpcomponents.client5:httpclient5:5.4.3") + api("org.apache.httpcomponents.client5:httpclient5:5.4.4") api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.4") api("org.apache.poi:poi-ooxml:5.2.5") api("org.apache.tomcat.embed:tomcat-embed-core:10.1.28") From 73f1c5a189b0f6e65b5b8507d6862b480ec7193c Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 13 May 2025 16:08:57 +0200 Subject: [PATCH 3/3] Polishing --- .../support/PropertySourcesPlaceholderConfigurer.java | 3 +-- .../http/client/HttpComponentsClientHttpRequestFactory.java | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index 11563360da3..7df8bf086ae 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -231,7 +231,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS super(ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, environment); } - @Override public boolean containsProperty(String name) { for (PropertySource propertySource : super.source.getPropertySources()) { @@ -260,6 +259,7 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS } } + /** * Fallback {@link PropertySource} that delegates to a raw {@link Environment}. *

Should never apply in a regular scenario, since the {@code Environment} @@ -272,7 +272,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS super(ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, environment); } - @Override public boolean containsProperty(String name) { return super.source.containsProperty(name); diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java index bbddc4f05da..bbcdcc87f84 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 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. @@ -75,6 +75,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest private long readTimeout = -1; + /** * Create a new instance of the {@code HttpComponentsClientHttpRequestFactory} * with a default {@link HttpClient} based on system properties. @@ -371,7 +372,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest } /** - * Template methods that creates a {@link HttpContext} for the given HTTP method and URI. + * Template method that creates a {@link HttpContext} for the given HTTP method and URI. *

The default implementation returns {@code null}. * @param httpMethod the HTTP method * @param uri the URI