You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2021/11/03 23:39:09 UTC

[geode] branch develop updated: GEODE-9794: Radish PassiveExpirationManager can throw NPE (#7072)

This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 835167a  GEODE-9794: Radish PassiveExpirationManager can throw NPE (#7072)
835167a is described below

commit 835167a58b329ce8ba51265b288e72ac264e9976
Author: Jens Deppe <jd...@vmware.com>
AuthorDate: Wed Nov 3 16:37:53 2021 -0700

    GEODE-9794: Radish PassiveExpirationManager can throw NPE (#7072)
---
 .../java/org/apache/geode/redis/internal/PassiveExpirationManager.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java
index 4e5bdf6..805b77b 100644
--- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java
+++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java
@@ -63,7 +63,8 @@ public class PassiveExpirationManager {
           PartitionRegionHelper.getLocalPrimaryData(regionProvider.getLocalDataRegion());
       for (Map.Entry<RedisKey, RedisData> entry : localPrimaryData.entrySet()) {
         try {
-          if (entry.getValue().hasExpired(now)) {
+          RedisData value = entry.getValue();
+          if (value != null && value.hasExpired(now)) {
             // pttl will do its own check using active expiration and expire the key if needed
 
             if (-2 == internalPttl(regionProvider, entry.getKey())) {