Skip to content

Commit ad67a77

Browse files
committed
Start building against Spring Framework 6.2.13 snapshots
See gh-48025 Closes gh-48032
1 parent 5a67f57 commit ad67a77

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mavenVersion=3.9.4
1919
mockitoVersion=5.14.2
2020
nativeBuildToolsVersion=0.10.6
2121
snakeYamlVersion=2.3
22-
springFrameworkVersion=6.2.12
22+
springFrameworkVersion=6.2.13-SNAPSHOT
2323
springFramework60xVersion=6.0.23
2424
tomcatVersion=10.1.48
2525

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/ReflectiveComponentsClientHttpRequestFactoryBuilder.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,22 @@ private Method findMethod(ClientHttpRequestFactory requestFactory, String method
123123
Method method = ReflectionUtils.findMethod(requestFactory.getClass(), methodName, parameters);
124124
Assert.state(method != null, () -> "Request factory %s does not have a suitable %s method"
125125
.formatted(requestFactory.getClass().getName(), methodName));
126-
Assert.state(!method.isAnnotationPresent(Deprecated.class),
127-
() -> "Request factory %s has the %s method marked as deprecated"
128-
.formatted(requestFactory.getClass().getName(), methodName));
126+
String requestFactoryClassName = requestFactory.getClass().getName();
127+
Assert.state(
128+
!method.isAnnotationPresent(Deprecated.class)
129+
|| isPermittedDeprecatedMethod(requestFactory, methodName),
130+
() -> "Request factory %s has the %s method marked as deprecated".formatted(requestFactoryClassName,
131+
methodName));
129132
return method;
130133
}
131134

135+
private boolean isPermittedDeprecatedMethod(ClientHttpRequestFactory requestFactory, String methodName) {
136+
String requestFactoryClassName = requestFactory.getClass().getName();
137+
return "setConnectTimeout".equals(methodName)
138+
&& "org.springframework.http.client.HttpComponentsClientHttpRequestFactory"
139+
.equals(requestFactoryClassName);
140+
}
141+
132142
private Method tryFindMethod(ClientHttpRequestFactory requestFactory, String methodName, Class<?>... parameters) {
133143
Method method = ReflectionUtils.findMethod(requestFactory.getClass(), methodName, parameters);
134144
if (method == null) {

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PatternParseFailureAnalyzerTests {
3737
void patternParseFailureQuotesPattern() {
3838
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
3939
assertThat(failureAnalysis.getDescription())
40-
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
40+
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
4141
assertThat(failureAnalysis.getAction())
4242
.contains("Fix this pattern in your application or switch to the legacy parser"
4343
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");

0 commit comments

Comments
 (0)