Browse Source

Polishing

pull/27217/head
Arjen Poutsma 6 years ago
parent
commit
e75556bc7b
  1. 20
      spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java

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

@ -246,19 +246,9 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem @@ -246,19 +246,9 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem
@Override
protected void hookOnError(Throwable ex) {
try {
if (this.parser != null) {
this.parser.close();
}
}
catch (IOException ex2) {
// ignore
}
finally {
if (this.listener != null) {
int index = this.storageFactory.getCurrentPartIndex();
this.listener.onError("Failure while parsing part[" + index + "]", ex);
}
if (this.listener != null) {
int index = this.storageFactory.getCurrentPartIndex();
this.listener.onError("Failure while parsing part[" + index + "]", ex);
}
}
@ -277,9 +267,7 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem @@ -277,9 +267,7 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem
}
}
catch (IOException ex) {
if (this.listener != null) {
this.listener.onError("Error while closing parser", ex);
}
// ignore
}
}

Loading…
Cancel
Save