Fixed incorrect exception messages
This commit is contained in:
parent
5a9d99743d
commit
bd403bdb98
@ -80,14 +80,14 @@ public class LengthFieldPrepender extends OneToOneEncoder {
|
|||||||
case 2:
|
case 2:
|
||||||
if (length >= 65536) {
|
if (length >= 65536) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"length does not fit into a byte: " + length);
|
"length does not fit into a short integer: " + length);
|
||||||
}
|
}
|
||||||
header.writeShort((short) length);
|
header.writeShort((short) length);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (length >= 16777216) {
|
if (length >= 16777216) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"length does not fit into a byte: " + length);
|
"length does not fit into a medium integer: " + length);
|
||||||
}
|
}
|
||||||
header.writeMedium(length);
|
header.writeMedium(length);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user