Fixed a bug in ByteArrayMarshaller

This commit is contained in:
leventov
2014-10-07 05:14:32 +04:00
parent 0cf883eade
commit b6f00d110b
@@ -58,7 +58,7 @@ public enum ByteArrayMarshaller implements BytesInterop<byte[]>, BytesReader<byt
@Override
public byte[] read(Bytes bytes, long size, byte[] ba) {
if (size != ba.length)
if (ba == null || size != ba.length)
ba = new byte[(int) size];
bytes.read(ba);
return ba;