File tree 4 files changed +39
-3
lines changed
main/java/org/springframework/data/redis/connection
test/java/org/springframework/data/redis/connection
4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -504,7 +504,7 @@ public boolean contains(Flag flag) {
504
504
* @return {@literal true} if no flags set.
505
505
*/
506
506
public boolean isEmpty () {
507
- return ! flags .isEmpty ();
507
+ return flags .isEmpty ();
508
508
}
509
509
510
510
@ Override
Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ public static GeoUnit toGeoUnit(Metric metric) {
689
689
*/
690
690
static ZAddParams toZAddParams (ZAddArgs source ) {
691
691
692
- if (! source .isEmpty ()) {
692
+ if (source .isEmpty ()) {
693
693
return new ZAddParams ();
694
694
}
695
695
Original file line number Diff line number Diff line change @@ -894,7 +894,7 @@ private static io.lettuce.core.ZAddArgs toZAddArgs(ZAddArgs source) {
894
894
895
895
io .lettuce .core .ZAddArgs target = new io .lettuce .core .ZAddArgs ();
896
896
897
- if (! source .isEmpty ()) {
897
+ if (source .isEmpty ()) {
898
898
return target ;
899
899
}
900
900
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2023 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ package org .springframework .data .redis .connection ;
17
+
18
+ import static org .assertj .core .api .Assertions .*;
19
+
20
+ import org .junit .jupiter .api .Test ;
21
+ import org .springframework .data .redis .connection .RedisZSetCommands .ZAddArgs ;
22
+
23
+ /**
24
+ * Unit tests for {@link RedisZSetCommands}.
25
+ *
26
+ * @author Mark Paluch
27
+ */
28
+ class RedisZSetCommandsUnitTests {
29
+
30
+ @ Test // GH-2588
31
+ void zAddArgsShouldReportEmpty () {
32
+
33
+ assertThat (ZAddArgs .empty ().isEmpty ()).isTrue ();
34
+ assertThat (ZAddArgs .ifExists ().isEmpty ()).isFalse ();
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments