Polishing

This commit is contained in:
Arjen Poutsma
2019-11-07 14:29:47 +01:00
parent d3d40983d6
commit e75556bc7b

View File

@@ -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
}
}
catch (IOException ex) {
if (this.listener != null) {
this.listener.onError("Error while closing parser", ex);
}
// ignore
}
}