提交 a747cc3e 编写于 作者: M Moncef AOUDIA 提交者: Rossen Stoyanchev

Fix error message in SynchronossPartHttpMessageReader

上级 161c9dc3
......@@ -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);
}
......
......@@ -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)");
}
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册