Skip to content

Commit

Permalink
refactoring: Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-ang committed Jun 21, 2024
1 parent 9050333 commit 8395836
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,4 @@ public <T> T read(String key, Class<T> clazz) {
public void delete(String key) {
this.redisSimpleTemplate.delete(key);
}

public <T> T delete(String key, Class<T> clazz) {
T result = null;
try {
Object value = this.redisSimpleTemplate.opsForValue().getAndDelete(key);
result = clazz.cast(value);
} catch (ClassCastException e) {
log.error(String.format("Cannot correctly parse the object retrieved with key [%s] in [%s] class", key, clazz.getCanonicalName()));
}
return result;
}
}

0 comments on commit 8395836

Please sign in to comment.