diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java index 1fd841aaed..299c57d5da 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java @@ -15,10 +15,7 @@ */ package io.micrometer.core.instrument.binder.cache; -import com.github.benmanes.caffeine.cache.AsyncLoadingCache; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; +import com.github.benmanes.caffeine.cache.*; import com.github.benmanes.caffeine.cache.stats.CacheStats; import io.micrometer.core.instrument.*; import io.micrometer.core.lang.NonNullApi; @@ -99,7 +96,7 @@ public CaffeineCacheMetrics(Cache cache, String cacheName, Iterable t * @param The cache type. * @return The instrumented cache, unchanged. The original cache is not wrapped or proxied in any way. */ - public static > C monitor(MeterRegistry registry, C cache, String cacheName, String... tags) { + public static > C monitor(MeterRegistry registry, C cache, String cacheName, String... tags) { return monitor(registry, cache, cacheName, Tags.of(tags)); } @@ -115,7 +112,7 @@ public CaffeineCacheMetrics(Cache cache, String cacheName, Iterable t * @return The instrumented cache, unchanged. The original cache is not wrapped or proxied in any way. * @see CacheStats */ - public static > C monitor(MeterRegistry registry, C cache, String cacheName, Iterable tags) { + public static > C monitor(MeterRegistry registry, C cache, String cacheName, Iterable tags) { monitor(registry, cache.synchronous(), cacheName, tags); return cache; }