mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Adapt to changes in Framework's internals
See gh-37995
This commit is contained in:
parent
959311bf0e
commit
a9469d9c8e
@ -62,13 +62,12 @@ import org.springframework.web.util.HtmlUtils;
|
||||
public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExceptionHandler, InitializingBean {
|
||||
|
||||
/**
|
||||
* Currently duplicated from Spring WebFlux HttpWebHandlerAdapter.
|
||||
* Currently duplicated from Spring Web's DisconnectedClientHelper.
|
||||
*/
|
||||
private static final Set<String> DISCONNECTED_CLIENT_EXCEPTIONS;
|
||||
|
||||
static {
|
||||
Set<String> exceptions = new HashSet<>();
|
||||
exceptions.add("AbortedException");
|
||||
exceptions.add("ClientAbortException");
|
||||
exceptions.add("EOFException");
|
||||
exceptions.add("EofException");
|
||||
|
@ -38,7 +38,7 @@ import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.reactive.result.view.View;
|
||||
import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.server.adapter.HttpWebHandlerAdapter;
|
||||
import org.springframework.web.util.DisconnectedClientHelper;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
@ -58,8 +58,7 @@ class DefaultErrorWebExceptionHandlerTests {
|
||||
void disconnectedClientExceptionsMatchesFramework() {
|
||||
Object errorHandlers = ReflectionTestUtils.getField(AbstractErrorWebExceptionHandler.class,
|
||||
"DISCONNECTED_CLIENT_EXCEPTIONS");
|
||||
Object webHandlers = ReflectionTestUtils.getField(HttpWebHandlerAdapter.class,
|
||||
"DISCONNECTED_CLIENT_EXCEPTIONS");
|
||||
Object webHandlers = ReflectionTestUtils.getField(DisconnectedClientHelper.class, "EXCEPTION_TYPE_NAMES");
|
||||
assertThat(errorHandlers).isNotNull().isEqualTo(webHandlers);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user