fix binary version of hgetAll(), fixes #711

This commit is contained in:
Ivan Dyedov
2014-08-26 11:50:56 -04:00
parent c42965dcd5
commit 9f4faf53ff
2 changed files with 21 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import redis.clients.util.JedisByteHashMap;
import redis.clients.util.SafeEncoder;
public class BuilderFactory {
@@ -170,7 +171,7 @@ public class BuilderFactory {
@SuppressWarnings("unchecked")
public Map<byte[], byte[]> build(Object data) {
final List<byte[]> flatHash = (List<byte[]>) data;
final Map<byte[], byte[]> hash = new HashMap<byte[], byte[]>();
final Map<byte[], byte[]> hash = new JedisByteHashMap();
final Iterator<byte[]> iterator = flatHash.iterator();
while (iterator.hasNext()) {
hash.put(iterator.next(), iterator.next());