File tree Expand file tree Collapse file tree 4 files changed +39
-3
lines changed
main/java/org/springframework/data/redis/connection
test/java/org/springframework/data/redis/connection Expand file tree Collapse file tree 4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ public boolean contains(Flag flag) {
313313 * @return {@literal true} if no flags set.
314314 */
315315 public boolean isEmpty () {
316- return ! flags .isEmpty ();
316+ return flags .isEmpty ();
317317 }
318318
319319 @ Override
Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ public static GeoUnit toGeoUnit(Metric metric) {
618618 */
619619 static ZAddParams toZAddParams (ZAddArgs source ) {
620620
621- if (! source .isEmpty ()) {
621+ if (source .isEmpty ()) {
622622 return new ZAddParams ();
623623 }
624624
Original file line number Diff line number Diff line change @@ -754,7 +754,7 @@ private static io.lettuce.core.ZAddArgs toZAddArgs(ZAddArgs source) {
754754
755755 io .lettuce .core .ZAddArgs target = new io .lettuce .core .ZAddArgs ();
756756
757- if (! source .isEmpty ()) {
757+ if (source .isEmpty ()) {
758758 return target ;
759759 }
760760
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