This commit is contained in:
wentch
2015-12-28 14:52:47 +08:00
parent 610c23fe86
commit f4eb98e467

View File

@@ -244,7 +244,7 @@ public class BsonWriter implements Writer {
byte[] bytes = new byte[chars.length + 1];
bytes[0] = (byte) chars.length;
for (int i = 0; i < chars.length; i++) {
if (chars[i] > Byte.MAX_VALUE) throw new ConvertException("'" + value + "' has double-word");
if (chars[i] > Byte.MAX_VALUE) throw new ConvertException("'" + value + "' has double-word");
bytes[i + 1] = (byte) chars[i];
}
writeTo(bytes);