Skip to content

Commit 524da90

Browse files
committed
Consistently throw IOException from ReactorNettyClientRequest
This commit renames ReactorNettyClientRequestFactoryTests. Closes gh-32952
1 parent 4323c60 commit 524da90

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

spring-web/src/main/java/org/springframework/http/client/ReactorNettyClientRequest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -101,7 +101,7 @@ protected ClientHttpResponse executeInternal(HttpHeaders headers, @Nullable Body
101101
return result;
102102
}
103103
}
104-
catch (RuntimeException ex) { // Exceptions.ReactiveException is package private
104+
catch (RuntimeException ex) { // Exceptions.ReactiveException is package private
105105
Throwable cause = ex.getCause();
106106

107107
if (cause instanceof UncheckedIOException uioEx) {
@@ -111,7 +111,7 @@ else if (cause instanceof IOException ioEx) {
111111
throw ioEx;
112112
}
113113
else {
114-
throw ex;
114+
throw new IOException(ex.getMessage(), cause);
115115
}
116116
}
117117
}
+2-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
/**
2929
* @author Arjen Poutsma
3030
* @author Sebastien Deleuze
31+
* @since 6.1
3132
*/
32-
class ReactorNettyClientHttpRequestFactoryTests extends AbstractHttpRequestFactoryTests {
33+
class ReactorNettyClientRequestFactoryTests extends AbstractHttpRequestFactoryTests {
3334

3435
@Override
3536
protected ClientHttpRequestFactory createRequestFactory() {

0 commit comments

Comments
 (0)