naver / arcus-spring

ARCUS as a caching provider for the Spring Cache Abstraction
Apache License 2.0
26 stars 16 forks source link

INTERNAL: Add @Nullable annotation. #62

Closed uhm0311 closed 7 months ago

uhm0311 commented 9 months ago

https://github.com/naver/arcus-spring/pull/61

위 PR의 후속 PR 입니다. KeyGenerator 구현체 뿐만 아니라, @Deprecated가 붙지 않은 모든 클래스에 null 사용 가능 여부를 어노테이션으로 명시했습니다.

ArcusCache 클래스의 put 관련 메소드 중, putIfAbsent() 메소드에 한해 value에 @NonNull이 붙어 있는 것은 해당 메소드에서만 value가 null일 경우 Exception을 던지기 때문입니다. 다른 put 관련 메소드에서는 value에 대해 null 체크를 한 후 null이면 로그를 찍고 캐싱 로직을 수행하지 않습니다.

uhm0311 commented 7 months ago

@jhpark816

@Nullable만 남기도록 했습니다.

uhm0311 commented 7 months ago

@jhpark816

오프라인 리뷰 반영했습니다.

uhm0311 commented 7 months ago

@jhpark816

커밋 메세지 수정했습니다.

jhpark816 commented 7 months ago

@uhm0311 @oliviarla 지금 보니, ArcusCacheConfiguration 클래스의 setter에서 @Nullable 어노테이션 붙인 것은 제거해야 할 것 같습니다.