DATAKV-23

This commit is contained in:
Costin Leau
2011-01-21 18:48:39 +02:00
parent 0948b28b48
commit 6e59acd62a
2 changed files with 3 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ package org.springframework.data.keyvalue.redis.serializer;
/**
* Basic interface serialization and deserialization of Objects to byte arrays (binary data).
*
* It is recommended that implementations are designed to handle null objects/empty arrays on serialization and deserialization side.
*
* @author Mark Pollack
* @author Costin Leau
*/

View File

@@ -43,7 +43,7 @@ public class StringRedisSerializer implements RedisSerializer<String> {
@Override
public String deserialize(byte[] bytes) {
return new String(bytes, charset);
return (SerializerUtils.isEmpty(bytes) ? null : new String(bytes, charset));
}
@Override