Polishing.

Reformat code.

See #1957.
Original pull request: #1962.
This commit is contained in:
Mark Paluch
2021-02-15 14:40:48 +01:00
parent 840c7f50ca
commit 1c94cf6212
2 changed files with 6 additions and 6 deletions

View File

@@ -322,7 +322,7 @@ class JedisClusterListCommands implements RedisListCommands {
if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys)) {
try {
return connection.getCluster().brpop(timeout,keys);
return connection.getCluster().brpop(timeout, keys);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}

View File

@@ -18,15 +18,14 @@ package org.springframework.data.redis.connection.jedis;
import redis.clients.jedis.BinaryJedis;
import redis.clients.jedis.MultiKeyPipelineBase;
import redis.clients.jedis.Protocol;
import redis.clients.jedis.params.LPosParams;
import java.util.Collections;
import java.util.List;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.redis.connection.RedisListCommands;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import redis.clients.jedis.params.LPosParams;
/**
* @author Christoph Strobl
@@ -64,15 +63,16 @@ class JedisListCommands implements RedisListCommands {
Assert.notNull(element, "Element must not be null!");
LPosParams params = new LPosParams();
if(rank != null) {
if (rank != null) {
params.rank(rank);
}
if(count != null) {
if (count != null) {
return connection.invoke().just(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params, count);
}
return connection.invoke().from(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params).getOrElse(Collections::singletonList, Collections::emptyList);
return connection.invoke().from(BinaryJedis::lpos, MultiKeyPipelineBase::lpos, key, element, params)
.getOrElse(Collections::singletonList, Collections::emptyList);
}
/*