Skip to content

Commit

Permalink
fix: 添加泛型标注
Browse files Browse the repository at this point in the history
  • Loading branch information
fzdwx committed Jul 28, 2023
1 parent 2e79ab1 commit c277aa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Object get(String key) {
}

@Override
public <T> T getOrStore(String key, int seconds, Supplier supplier) {
public <T> T getOrStore(String key, int seconds, Supplier<T> supplier) {
return (T) client.get(key, (k) -> supplier.get());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface CacheService {
*
* @since 1.7
*/
default <T> T getOrStore(String key, int seconds, Supplier supplier) {
default <T> T getOrStore(String key, int seconds, Supplier<T> supplier) {
Object obj = get(key);
if (obj == null) {
obj = supplier.get();
Expand Down

0 comments on commit c277aa3

Please sign in to comment.