Skip to content

Commit

Permalink
Merge pull request #185 from fzdwx/dev
Browse files Browse the repository at this point in the history
fix: 添加泛型标注
  • Loading branch information
noear authored Jul 28, 2023
2 parents c22a73d + c277aa3 commit f3a4c17
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 f3a4c17

Please sign in to comment.