Skip to content

Commit 1c94cf6

Browse files
committed
Polishing.
Reformat code. See #1957. Original pull request: #1962.
1 parent 840c7f5 commit 1c94cf6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterListCommands.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public List<byte[]> bRPop(int timeout, byte[]... keys) {
322322

323323
if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys)) {
324324
try {
325-
return connection.getCluster().brpop(timeout,keys);
325+
return connection.getCluster().brpop(timeout, keys);
326326
} catch (Exception ex) {
327327
throw convertJedisAccessException(ex);
328328
}

src/main/java/org/springframework/data/redis/connection/jedis/JedisListCommands.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@
1818
import redis.clients.jedis.BinaryJedis;
1919
import redis.clients.jedis.MultiKeyPipelineBase;
2020
import redis.clients.jedis.Protocol;
21+
import redis.clients.jedis.params.LPosParams;
2122

2223
import java.util.Collections;
2324
import java.util.List;
2425

25-
import org.springframework.dao.InvalidDataAccessApiUsageException;
2626
import org.springframework.data.redis.connection.RedisListCommands;
2727
import org.springframework.lang.Nullable;
2828
import org.springframework.util.Assert;
29-
import redis.clients.jedis.params.LPosParams;
3029

3130
/**
3231
* @author Christoph Strobl
@@ -64,15 +63,16 @@ public List<Long> lPos(byte[] key, byte[] element, @Nullable Integer rank, @Null
6463
Assert.notNull(element, "Element must not be null!");
6564

6665
LPosParams params = new LPosParams();
67-
if(rank != null) {
66+
if (rank != null) {
6867
params.rank(rank);
6968
}
7069

71-
if(count != null) {
70+
if (count != null) {
7271
return connection.invoke().just(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params, count);
7372
}
7473

75-
return connection.invoke().from(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params).getOrElse(Collections::singletonList, Collections::emptyList);
74+
return connection.invoke().from(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params)
75+
.getOrElse(Collections::singletonList, Collections::emptyList);
7676
}
7777

7878
/*

0 commit comments

Comments
 (0)