From 421c464dd8771c735ba63b48456ff2cea90b28f4 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 16 Jan 2020 14:30:47 +0100 Subject: [PATCH] Deprecate CachingOperationInvoker#apply This commit deprecates the only public accessor to `CacheOperationInvoker` so that we can make the entire class package private in the next feature release. Closes gh-19089 --- .../actuate/endpoint/invoker/cache/CachingOperationInvoker.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java index 51842bfe3775..0a799ce2a9eb 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java @@ -111,7 +111,9 @@ private CachedResponse createCachedResponse(Object response, long accessTime) { * @param timeToLive the maximum time in milliseconds that a response can be cached * @return a caching version of the invoker or the original instance if caching is not * required + * @deprecated as of 2.3.0 to make it package-private in 2.4 */ + @Deprecated public static OperationInvoker apply(OperationInvoker invoker, long timeToLive) { if (timeToLive > 0) { return new CachingOperationInvoker(invoker, timeToLive);