fix incorrect cast of BulkReply to byte[] in SprConnection

DATAREDIS-114
This commit is contained in:
Costin Leau
2013-02-05 19:01:14 +02:00
parent a0f7e690cf
commit 0b70fa2d23
2 changed files with 17 additions and 2 deletions

View File

@@ -147,10 +147,10 @@ abstract class SrpUtils {
return tuples;
}
static Map<byte[], byte[]> toMap(Object[] byteArrays) {
static Map<byte[], byte[]> toMap(Reply[] byteArrays) {
Map<byte[], byte[]> map = new LinkedHashMap<byte[], byte[]>(byteArrays.length / 2);
for (int i = 0; i < byteArrays.length; i++) {
map.put((byte[]) byteArrays[i++], (byte[]) byteArrays[i]);
map.put((byte[]) byteArrays[i++].data(), (byte[]) byteArrays[i].data());
}
return map;
}