Skip to content

Commit aa3a06b

Browse files
devFozgulmarcosnils
authored andcommitted
Fixing squid: S1168 Empty arrays and collections should be returned instead of null Jedis.java class part 1 (redis#1308)
1 parent 63079a2 commit aa3a06b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/redis/clients/jedis/Jedis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ public Set<String> smembers(final String key) {
11801180
client.smembers(key);
11811181
final List<String> members = client.getMultiBulkReply();
11821182
if (members == null) {
1183-
return null;
1183+
return Collections.emptySet();
11841184
}
11851185
return SetFromList.of(members);
11861186
}
@@ -1226,7 +1226,7 @@ public Set<String> spop(final String key, final long count) {
12261226
client.spop(key, count);
12271227
final List<String> members = client.getMultiBulkReply();
12281228
if (members == null) {
1229-
return null;
1229+
return Collections.emptySet();
12301230
}
12311231
return SetFromList.of(members);
12321232
}

0 commit comments

Comments
 (0)