diff --git a/redisson/src/main/java/org/redisson/RedissonSet.java b/redisson/src/main/java/org/redisson/RedissonSet.java index 336b2d926..012590f08 100644 --- a/redisson/src/main/java/org/redisson/RedissonSet.java +++ b/redisson/src/main/java/org/redisson/RedissonSet.java @@ -436,10 +436,10 @@ public class RedissonSet extends RedissonExpirable implements RSet, ScanIt @Override public RFuture> readUnionAsync(String... names) { - List args = new ArrayList(names.length + 1); + List args = new ArrayList<>(names.length + 1); args.add(getRawName()); args.addAll(Arrays.asList(names)); - return commandExecutor.writeAsync(getRawName(), codec, RedisCommands.SUNION, args.toArray()); + return commandExecutor.readAsync(getRawName(), codec, RedisCommands.SUNION, args.toArray()); } @Override @@ -462,10 +462,10 @@ public class RedissonSet extends RedissonExpirable implements RSet, ScanIt @Override public RFuture> readDiffAsync(String... names) { - List args = new ArrayList(names.length + 1); + List args = new ArrayList<>(names.length + 1); args.add(getRawName()); args.addAll(Arrays.asList(names)); - return commandExecutor.writeAsync(getRawName(), codec, RedisCommands.SDIFF, args.toArray()); + return commandExecutor.readAsync(getRawName(), codec, RedisCommands.SDIFF, args.toArray()); } @Override @@ -488,10 +488,10 @@ public class RedissonSet extends RedissonExpirable implements RSet, ScanIt @Override public RFuture> readIntersectionAsync(String... names) { - List args = new ArrayList(names.length + 1); + List args = new ArrayList<>(names.length + 1); args.add(getRawName()); args.addAll(Arrays.asList(names)); - return commandExecutor.writeAsync(getRawName(), codec, RedisCommands.SINTER, args.toArray()); + return commandExecutor.readAsync(getRawName(), codec, RedisCommands.SINTER, args.toArray()); } @Override