Fix NPE in RedisDistributedMapCacheClientService caused by newer versions of Jedis
This closes
@@ -161,8 +161,9 @@ public class RedisDistributedMapCacheClientService extends AbstractControllerSer
final List<Object> results = redisConnection.exec();
// if the results list was empty, then the transaction failed (i.e. key was modified after we started watching), so keep looping to retry
+ // if the results list was null, then the transaction failed
// if the results list has results, then the transaction succeeded and it should have the result of the setNX operation
- if (results.size() > 0) {
+ if (results != null && results.size() > 0) {
final Object firstResult = results.get(0);
if (firstResult instanceof Boolean) {
final Boolean absent = (Boolean) firstResult;
@@ -337,7 +338,7 @@ public class RedisDistributedMapCacheClientService extends AbstractControllerSer
final List<Object> results = redisConnection.exec();
// if we have a result then the replace succeeded
- if (results.size() > 0) {
+ if (results != null && results.size() > 0) {
replaced = true;
}
