Fix error message in SynchronossPartHttpMessageReader

This commit is contained in:
Moncef AOUDIA 2021-07-27 11:46:24 +02:00 committed by Rossen Stoyanchev
parent 161c9dc3bd
commit a747cc3e91
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem
this.isFilePart = (MultipartUtils.getFileName(headers) != null);
this.partSize = 0;
if (maxParts > 0 && index > maxParts) {
throw new DecodingException("Too many parts (" + index + " allowed)");
throw new DecodingException("Too many parts (" + index + "/" + maxParts + " allowed)");
}
return this.storageFactory.newStreamStorageForPartBody(headers, index);
}

View File

@ -170,7 +170,7 @@ public class SynchronossPartHttpMessageReaderTests extends AbstractLeakCheckingT
.isInstanceOf(DecodingException.class)
.hasMessageStartingWith("Failure while parsing part[2]");
assertThat(ex.getCause())
.hasMessage("Too many parts (2 allowed)");
.hasMessage("Too many parts (2/1 allowed)");
}
);
}