File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
spring-web/src/main/java/org/springframework/http/client Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,16 @@ static IOException convertException(RuntimeException ex) {
131
131
// Exceptions.ReactiveException is package private
132
132
Throwable cause = ex .getCause ();
133
133
134
- if (cause instanceof UncheckedIOException uioEx ) {
135
- return uioEx .getCause ();
136
- }
137
- else if (cause instanceof IOException ioEx ) {
134
+ if (cause instanceof IOException ioEx ) {
138
135
return ioEx ;
139
136
}
140
- else {
141
- return new IOException (ex .getMessage (), cause );
137
+ if (cause instanceof UncheckedIOException uioEx ) {
138
+ IOException ioEx = uioEx .getCause ();
139
+ if (ioEx != null ) {
140
+ return ioEx ;
141
+ }
142
142
}
143
+ return new IOException (ex .getMessage (), cause );
143
144
}
144
145
145
146
You can’t perform that action at this time.
0 commit comments