Skip to content

Commit b4978aa

Browse files
committed
fix sonarqube issue (Replace function call with indexed accessor)
1 parent e25b974 commit b4978aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infra/redis/src/main/kotlin/com/anycommunity/infra/redis/lock/ExecuteIfAcquiredHandler.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fun executeIfAcquired(
6161
function()
6262
}
6363
} finally {
64-
if (redisTemplate.opsForValue().get(lockKey) == lockValue) {
64+
if (redisTemplate.opsForValue()[lockKey] == lockValue) {
6565
redisTemplate.delete(lockKey)
6666
} else {
6767
log.warn { "작업이 완료되기 전 락이 해제되었습니다. lockKey: $lockKey" }

0 commit comments

Comments
 (0)