Fix ZAddArgs.isEmpty.
isEmpty now returns true if empty. Previously, the boolean returns were flipped. Closes #2588
This commit is contained in:
@@ -313,7 +313,7 @@ public interface RedisZSetCommands {
|
||||
* @return {@literal true} if no flags set.
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
return !flags.isEmpty();
|
||||
return flags.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -618,7 +618,7 @@ abstract class JedisConverters extends Converters {
|
||||
*/
|
||||
static ZAddParams toZAddParams(ZAddArgs source) {
|
||||
|
||||
if (!source.isEmpty()) {
|
||||
if (source.isEmpty()) {
|
||||
return new ZAddParams();
|
||||
}
|
||||
|
||||
|
||||
@@ -754,7 +754,7 @@ class LettuceZSetCommands implements RedisZSetCommands {
|
||||
|
||||
io.lettuce.core.ZAddArgs target = new io.lettuce.core.ZAddArgs();
|
||||
|
||||
if (!source.isEmpty()) {
|
||||
if (source.isEmpty()) {
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user