GH-3549: Fix minor SonarQube smells

Fixes https://github.com/spring-projects/spring-integration/issues/3549
This commit is contained in:
trungPa
2021-07-23 22:07:39 +07:00
committed by GitHub
parent bc8246d267
commit 9e512186ed
33 changed files with 77 additions and 77 deletions

View File

@@ -93,7 +93,7 @@ public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore
Assert.isInstanceOf(String.class, groupId);
String key = (String) groupId;
Integer priority = new IntegrationMessageHeaderAccessor(message).getPriority();
if (priority != null && priority < 10 && priority >= 0) {
if (priority != null && priority < 10 && priority >= 0) { // NOSONAR magic number
key = key + ":" + priority;
}
return super.addMessageToGroup(key, message);

View File

@@ -374,7 +374,7 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl
int result = 1;
result = prime * result + getOuterType().hashCode();
result = prime * result + ((this.lockKey == null) ? 0 : this.lockKey.hashCode());
result = prime * result + (int) (this.lockedAt ^ (this.lockedAt >>> 32));
result = prime * result + (int) (this.lockedAt ^ (this.lockedAt >>> 32)); // NOSONAR magic number
result = prime * result + RedisLockRegistry.this.clientId.hashCode();
return result;
}