You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by nn...@apache.org on 2018/11/07 17:45:29 UTC

[geode] branch develop updated: GEODE-5983: Added missing null check (#2800)

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

nnag 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 cae30b0  GEODE-5983: Added missing null check (#2800)
cae30b0 is described below

commit cae30b0cd90a087864c15e85bc725744c49bfd04
Author: Nabarun Nag <na...@users.noreply.github.com>
AuthorDate: Wed Nov 7 09:45:20 2018 -0800

    GEODE-5983: Added missing null check (#2800)
---
 .../org/apache/geode/redis/internal/executor/list/ListExecutor.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/redis/internal/executor/list/ListExecutor.java b/geode-core/src/main/java/org/apache/geode/redis/internal/executor/list/ListExecutor.java
index 2077fff..ece6d1b 100755
--- a/geode-core/src/main/java/org/apache/geode/redis/internal/executor/list/ListExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/redis/internal/executor/list/ListExecutor.java
@@ -127,8 +127,8 @@ public abstract class ListExecutor extends AbstractExecutor {
       boolean indexSet = false;
       do {
         Integer existingIndex = (Integer) keyRegion.get(indexKey);
-        if ((pushType == ListDirection.RIGHT && existingIndex < index)
-            || (pushType == ListDirection.LEFT && existingIndex > index))
+        if (index != null && ((pushType == ListDirection.RIGHT && existingIndex < index)
+            || (pushType == ListDirection.LEFT && existingIndex > index)))
           indexSet = keyRegion.replace(indexKey, existingIndex, index);
         else
           break;