Skip to content

Commit

Permalink
GEODE-5983: Added missing null check (apache#2800)
Browse files Browse the repository at this point in the history
  • Loading branch information
nabarunnag authored Nov 7, 2018
1 parent 144758b commit cae30b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ protected void pushElements(ByteArrayWrapper key, List<byte[]> commandElems, int
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;
Expand Down

0 comments on commit cae30b0

Please sign in to comment.