You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/05/08 03:26:41 UTC
[GitHub] [geode] prettyClouds commented on a change in pull request #5058: GEODE-8089: more redis set ops use functions
prettyClouds commented on a change in pull request #5058:
URL: https://github.com/apache/geode/pull/5058#discussion_r421915839
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SScanExecutor.java
##########
@@ -108,53 +99,17 @@ public void executeCommand(Command command, ExecutionHandlerContext context) {
return;
}
- @SuppressWarnings("unchecked")
- List<ByteArrayWrapper> returnList =
- (List<ByteArrayWrapper>) getIteration(new ArrayList<>(set), matchPattern,
- count, cursor);
-
+ RedisSetCommands redisSetCommands =
+ new RedisSetCommandsFunctionExecutor(context.getRegionProvider().getSetRegion());
+ List<Object> returnList = redisSetCommands.sscan(key, matchPattern, count, cursor);
+ if (returnList == null) {
+ returnList = Collections.emptyList();
+ }
Review comment:
I don't think `returnList` can ever be null. In that case, this check is unnecessary
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org