Skip to content

Commit cc49b30

Browse files
committed
Merge branch '3.4.x'
2 parents ae83f7e + 049f8a0 commit cc49b30

File tree

2 files changed

+6
-34
lines changed

2 files changed

+6
-34
lines changed

buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.boot.build.bom;
1818

19-
import java.io.IOException;
2019
import java.net.URI;
2120
import java.net.URISyntaxException;
2221

@@ -31,9 +30,8 @@
3130

3231
import org.springframework.http.HttpMethod;
3332
import org.springframework.http.ResponseEntity;
34-
import org.springframework.http.client.ClientHttpResponse;
3533
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
36-
import org.springframework.web.client.DefaultResponseErrorHandler;
34+
import org.springframework.web.client.NoOpResponseErrorHandler;
3735
import org.springframework.web.client.RestTemplate;
3836

3937
/**
@@ -57,7 +55,7 @@ void releaseNotes() {
5755
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(config).build();
5856
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
5957
RestTemplate restTemplate = new RestTemplate(requestFactory);
60-
restTemplate.setErrorHandler(new IgnoringErrorHandler());
58+
restTemplate.setErrorHandler(new NoOpResponseErrorHandler());
6159
for (Library library : this.bom.getLibraries()) {
6260
library.getLinks().forEach((name, links) -> links.forEach((link) -> {
6361
URI uri;
@@ -74,12 +72,4 @@ void releaseNotes() {
7472
}
7573
}
7674

77-
static class IgnoringErrorHandler extends DefaultResponseErrorHandler {
78-
79-
@Override
80-
public void handleError(ClientHttpResponse response) throws IOException {
81-
}
82-
83-
}
84-
8575
}

spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/intTest/java/org/springframework/boot/context/embedded/EmbeddedServerContainerInvocationContextProvider.java

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -44,12 +44,10 @@
4444
import org.junit.platform.commons.util.ReflectionUtils;
4545

4646
import org.springframework.boot.testsupport.BuildOutput;
47-
import org.springframework.http.HttpMethod;
48-
import org.springframework.http.client.ClientHttpResponse;
4947
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
5048
import org.springframework.util.FileSystemUtils;
5149
import org.springframework.util.StringUtils;
52-
import org.springframework.web.client.ResponseErrorHandler;
50+
import org.springframework.web.client.NoOpResponseErrorHandler;
5351
import org.springframework.web.client.RestTemplate;
5452
import org.springframework.web.util.UriTemplateHandler;
5553

@@ -188,23 +186,7 @@ public Object resolveParameter(ParameterContext parameterContext, ExtensionConte
188186
RestTemplate rest = new RestTemplate(new HttpComponentsClientHttpRequestFactory(HttpClients.custom()
189187
.setRetryStrategy(new DefaultHttpRequestRetryStrategy(10, TimeValue.of(1, TimeUnit.SECONDS)))
190188
.build()));
191-
rest.setErrorHandler(new ResponseErrorHandler() {
192-
193-
@Override
194-
public boolean hasError(ClientHttpResponse response) throws IOException {
195-
return false;
196-
}
197-
198-
@Override
199-
@SuppressWarnings("removal")
200-
public void handleError(ClientHttpResponse response) throws IOException {
201-
}
202-
203-
@Override
204-
public void handleError(URI url, HttpMethod method, ClientHttpResponse response) throws IOException {
205-
}
206-
207-
});
189+
rest.setErrorHandler(new NoOpResponseErrorHandler());
208190
rest.setUriTemplateHandler(new UriTemplateHandler() {
209191

210192
@Override

0 commit comments

Comments
 (0)