CLEANUP: Refactored ArcusReplKetamaNodeLocator class. #757
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SonarLint의 클린 코드 가이드를 기반으로 리팩토링을 진행했습니다.
변경사항이 많아 클래스 하나씩 진행할 예정입니다.
FIXME
주석의 올바른 문법 적용@Override
어노테이션을 붙일 수 있는 메소드에 해당 어노테이션 추가continue
와return
을 이용한 Indent Depth 조절Map.computeIfAbsent()
와 Stream 기능 사용MemcachedNode.closeChannel()
에서 try-catch를 사용하는 보일러 플레이트를 메소드화needToMigrateRange => needToMigrate
)Long.hashCode()
메소드의 내부 구현을 하드코딩한 부분을Long.hashCode()
메소드를 사용하는 것으로 대체new TreeSet<MemcachedReplicaGroup>(new ArcusReplKetamaNodeLocatorConfiguration.MemcachedReplicaGroupComparator())
를 메소드화public
접근 제한자 제거IllegalArgumentException
을 던지도록 수정