Skip to content

Commit e75556b

Browse files
committed
Polishing
1 parent d3d4098 commit e75556b

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,19 +246,9 @@ protected void hookOnNext(DataBuffer buffer) {
246246

247247
@Override
248248
protected void hookOnError(Throwable ex) {
249-
try {
250-
if (this.parser != null) {
251-
this.parser.close();
252-
}
253-
}
254-
catch (IOException ex2) {
255-
// ignore
256-
}
257-
finally {
258-
if (this.listener != null) {
259-
int index = this.storageFactory.getCurrentPartIndex();
260-
this.listener.onError("Failure while parsing part[" + index + "]", ex);
261-
}
249+
if (this.listener != null) {
250+
int index = this.storageFactory.getCurrentPartIndex();
251+
this.listener.onError("Failure while parsing part[" + index + "]", ex);
262252
}
263253
}
264254

@@ -277,9 +267,7 @@ protected void hookFinally(SignalType type) {
277267
}
278268
}
279269
catch (IOException ex) {
280-
if (this.listener != null) {
281-
this.listener.onError("Error while closing parser", ex);
282-
}
270+
// ignore
283271
}
284272
}
285273

0 commit comments

Comments
 (0)