Skip to content

Commit a26d31e

Browse files
committed
Merge branch '6.1.x'
# Conflicts: # framework-platform/framework-platform.gradle
2 parents 017bf45 + 6c054f8 commit a26d31e

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

framework-platform/framework-platform.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ javaPlatform {
99
dependencies {
1010
api(platform("com.fasterxml.jackson:jackson-bom:2.15.4"))
1111
api(platform("io.micrometer:micrometer-bom:1.13.0"))
12-
api(platform("io.netty:netty-bom:4.1.109.Final"))
12+
api(platform("io.netty:netty-bom:4.1.110.Final"))
1313
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
1414
api(platform("io.projectreactor:reactor-bom:2024.0.0-M2"))
1515
api(platform("io.rsocket:rsocket-bom:1.1.3"))
1616
api(platform("org.apache.groovy:groovy-bom:4.0.21"))
1717
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
1818
api(platform("org.assertj:assertj-bom:3.26.0"))
19-
api(platform("org.eclipse.jetty:jetty-bom:12.0.9"))
20-
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.9"))
19+
api(platform("org.eclipse.jetty:jetty-bom:12.0.10"))
20+
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.10"))
2121
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3"))
2222
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.0"))
2323
api(platform("org.junit:junit-bom:5.10.2"))
@@ -130,7 +130,7 @@ dependencies {
130130
api("org.hsqldb:hsqldb:2.7.2")
131131
api("org.htmlunit:htmlunit:4.1.0")
132132
api("org.javamoney:moneta:1.4.2")
133-
api("org.jruby:jruby:9.4.6.0")
133+
api("org.jruby:jruby:9.4.7.0")
134134
api("org.junit.support:testng-engine:1.0.5")
135135
api("org.mozilla:rhino:1.7.14")
136136
api("org.ogce:xpp3:1.1.6")
@@ -139,7 +139,7 @@ dependencies {
139139
api("org.seleniumhq.selenium:htmlunit3-driver:4.20.0")
140140
api("org.seleniumhq.selenium:selenium-java:4.20.0")
141141
api("org.skyscreamer:jsonassert:1.5.1")
142-
api("org.slf4j:slf4j-api:2.0.12")
142+
api("org.slf4j:slf4j-api:2.0.13")
143143
api("org.testng:testng:7.9.0")
144144
api("org.webjars:underscorejs:1.8.3")
145145
api("org.webjars:webjars-locator-core:0.55")

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

+19-12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
* Created via the {@link ReactorNettyClientRequestFactory}.
4343
*
4444
* @author Arjen Poutsma
45+
* @author Juergen Hoeller
4546
* @since 6.1
4647
*/
4748
final class ReactorNettyClientRequest extends AbstractStreamingClientHttpRequest {
@@ -101,18 +102,8 @@ protected ClientHttpResponse executeInternal(HttpHeaders headers, @Nullable Body
101102
return result;
102103
}
103104
}
104-
catch (RuntimeException ex) { // Exceptions.ReactiveException is package private
105-
Throwable cause = ex.getCause();
106-
107-
if (cause instanceof UncheckedIOException uioEx) {
108-
throw uioEx.getCause();
109-
}
110-
else if (cause instanceof IOException ioEx) {
111-
throw ioEx;
112-
}
113-
else {
114-
throw new IOException(ex.getMessage(), cause);
115-
}
105+
catch (RuntimeException ex) {
106+
throw convertException(ex);
116107
}
117108
}
118109

@@ -136,6 +127,22 @@ private Publisher<Void> send(HttpHeaders headers, @Nullable Body body,
136127
}
137128
}
138129

130+
static IOException convertException(RuntimeException ex) {
131+
// Exceptions.ReactiveException is package private
132+
Throwable cause = ex.getCause();
133+
134+
if (cause instanceof IOException ioEx) {
135+
return ioEx;
136+
}
137+
if (cause instanceof UncheckedIOException uioEx) {
138+
IOException ioEx = uioEx.getCause();
139+
if (ioEx != null) {
140+
return ioEx;
141+
}
142+
}
143+
return new IOException(ex.getMessage(), cause);
144+
}
145+
139146

140147
private static final class ByteBufMapper implements OutputStreamPublisher.ByteMapper<ByteBuf> {
141148

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* {@link ClientHttpResponse} implementation for the Reactor-Netty HTTP client.
3434
*
3535
* @author Arjen Poutsma
36+
* @author Juergen Hoeller
3637
* @since 6.1
3738
*/
3839
final class ReactorNettyClientResponse implements ClientHttpResponse {
@@ -79,8 +80,13 @@ public InputStream getBody() throws IOException {
7980
return body;
8081
}
8182

82-
body = this.connection.inbound().receive()
83-
.aggregate().asInputStream().block(this.readTimeout);
83+
try {
84+
body = this.connection.inbound().receive().aggregate().asInputStream().block(this.readTimeout);
85+
}
86+
catch (RuntimeException ex) {
87+
throw ReactorNettyClientRequest.convertException(ex);
88+
}
89+
8490
if (body == null) {
8591
throw new IOException("Could not receive body");
8692
}

0 commit comments

Comments
 (0)