Authored by LUOXC

refactor

(cherry picked from commit 460af584)
(cherry picked from commit 44211818912a12fc84a232e1f69c8244245846bb)
... ... @@ -23,9 +23,7 @@ public class RedisLock {
public boolean acquire(RedisKeyBuilder key, String value, final long timeout, final TimeUnit unit) {
try {
String redisLockValue = valueOperations.get(key);
if (value.equals(redisLockValue)) {
return true;
} else if (StringUtils.isNoneBlank(redisLockValue)) {
if (StringUtils.isNoneBlank(redisLockValue)) {
return false;
}
valueOperations.set(key, value, timeout, unit);
... ...