Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(telemetry): replace the deprecated method and constructor du…
…ring upgrade of spring boot 3.0.x While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-telemetry module: ``` > Task :kork-telemetry:compileJava FAILED /kork/kork-telemetry/src/main/java/com/netflix/spinnaker/kork/telemetry/caffeine/CaffeineStatsCounter.java:26: error: CaffeineStatsCounter is not abstract and does not override abstract method recordEviction(int,RemovalCause) in StatsCounter public class CaffeineStatsCounter implements StatsCounter { ^ /kork/kork-telemetry/src/main/java/com/netflix/spinnaker/kork/telemetry/caffeine/CaffeineStatsCounter.java:73: error: method does not override or implement a method from a supertype @OverRide ^ /kork/kork-telemetry/src/main/java/com/netflix/spinnaker/kork/telemetry/caffeine/CaffeineStatsCounter.java:79: error: method does not override or implement a method from a supertype @OverRide ^ /kork/kork-telemetry/src/main/java/com/netflix/spinnaker/kork/telemetry/caffeine/CaffeineStatsCounter.java:87: error: CacheStats(long,long,long,long,long,long,long) has private access in CacheStats return new CacheStats( ^ 4 errors ``` Spring boot upgrade brings the caffeine 3.1.8 transitively, that was 2.9.3 with spring boot 2.7.x. In caffeine 3.x, `StatsCounter.recordEviction` method variation has been deprecated and `CacheStats` constructor. So, update the both of them. https://github.com/ben-manes/caffeine/releases/tag/v3.0.0 https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/latest/com.github.benmanes.caffeine/com/github/benmanes/caffeine/cache/stats/StatsCounter.html https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/2.9.3/com/github/benmanes/caffeine/cache/stats/StatsCounter.html
- Loading branch information