Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
trentjeff committed Oct 5, 2023
1 parent 98b7e3b commit 0f1d369
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ class TlsManagerCache {
private TlsManagerCache() {
}

@SuppressWarnings("unchecked")
static <T> TlsManager getOrCreate(T configBean,
Function<Object, TlsManager> creator) {
Function<T, TlsManager> creator) {
Objects.requireNonNull(configBean);
Objects.requireNonNull(creator);
return CACHE.computeIfAbsent(configBean, creator);
return CACHE.computeIfAbsent(configBean, (Function<Object, TlsManager>) creator);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface TlsManagerProvider extends ConfiguredProvider<TlsManager> {
* @return the tls manager instance from cache, defaulting to creation from the {@code creator} if not in cache
*/
static <T> TlsManager getOrCreate(T configBean,
Function<Object, TlsManager> creator) {
Function<T, TlsManager> creator) {
return TlsManagerCache.getOrCreate(configBean, creator);
}

Expand Down

0 comments on commit 0f1d369

Please sign in to comment.