DATAKV-23
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user