issues
search
naver
/
arcus-java-client
ARCUS Java client
Apache License 2.0
50
stars
46
forks
source link
CLEANUP: remove switch-case in receivedStatus
#785
Closed
oliviarla
closed
2 months ago
oliviarla
commented
2 months ago
https://github.com/jam2in/arcus-works/issues/425
API의 반환 타입을 논의하면서 코드가 보기 불편하고 비일관적인 부분이 있어 이를 리팩토링하기로 했습니다.
현재 연산 실패가 발생하면 대부분 null을 반환하고, not found element / out of range로 인해 실패하는 경우에만 empty collection을 반환합니다. 따라서 switch-case 문을 제거해도 충분하다고 판단했습니다.
default 문에서 "Unhandled state" 디버그 로그를 남길 필요가 없습니다. 이미 cstatus 로 응답을 변환할 때 "Unhandled state" 워닝 로그를 남기기 때문에, 디버그 로그는 단지 연산이 실패함만을 남기면 충분합니다.