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:
Jens Deppe
2022-05-13 12:22:55 -07:00
committed by Mark Paluch
parent 855fd9be5a
commit c8f4d0c414
2 changed files with 7 additions and 1 deletions

View File

@@ -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;
}