spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

Remove duplicated duration validation logic in `DefaultRedisCacheWriter`.

Open youngsuk-kim opened this issue 3 weeks ago • 0 comments

Current Code

The same validation pattern appears twice:

  • Line 215: !sleepTime.isZero() && !sleepTime.isNegative()
  • Line 566: !this.sleepTime.isZero() && !this.sleepTime.isNegative()

Proposed Solution

Extract this logic into a helper method isPositiveDuration(Duration) to improve code maintainability and readability.

youngsuk-kim avatar Nov 27 '25 03:11 youngsuk-kim