Fix potential NullPointerException when using Jedis Cluster BZPOP*.
For the Jedis-based implementations of bzpopmin and bzpopmax, a NPE is thrown if the provided timeout elapses and the server responds with a null array. Closes #2324
This commit is contained in:
@@ -1044,7 +1044,7 @@ class JedisClusterZSetCommands implements RedisZSetCommands {
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Tuple toTuple(List<?> bytes) {
|
||||
|
||||
if (bytes.isEmpty()) {
|
||||
if (bytes == null || bytes.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user