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

Extract precision API fallback with type-safe enum

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

Refactor: Extract precision API fallback with type-safe enum

Remove 66 lines of duplicate try-catch code from RedisTemplate. Replace hardcoded strings with PrecisionCommand enum. Add logging and specific exception handling.

No functional changes, backward compatible.

Changes

  • New: PrecisionApiHelper.java with PrecisionCommand enum
  • Modified: RedisTemplate.java - updated expire(), expireAt(), getExpire()

Testing

  • All existing tests pass
  • No behavior changes

Closes #3274


  • [x] You have read the Spring Data contribution guidelines.
  • [x] You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
  • [x] You submit test cases (unit or integration tests) that back your changes.
  • [x] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

youngsuk-kim avatar Dec 07 '25 11:12 youngsuk-kim