my gradle config is:
"com.github.ben-manes.caffeine:caffeine:3.0.2",
but ,the jar lib is caffeine-3.0.2-all.jar ,not caffeine-3.0.2.jar
but 2.9.0,2.9.1 is correct.
also gradle build error:
错误: 无法访问Cache
import com.github.benmanes.caffeine.cache.Cache;
^
错误的类文件: D:\Java\gradle_repo\caches\modules-2\files-2.1\com.github.ben-manes.caffeine\caffeine\3.0.2\91d4d238f15f0323219dadd7dcea1d0c23219398\caffeine-3.0.2-all.jar(com/github/benmanes/caffeine/cache/Cache.class)
类文件具有错误的版本 55.0, 应为 52.0
请删除该文件或确保该文件位于正确的类路径子目录中。
Hi @lizongbo,
The release notes for 3.0 state,
Highlights
- Java 11 or above is required
- Java 8 users can continue to use version 2.x, which will be supported
We still support v2 for Java 8 users, and released 2.9.1 after the 3.0 release to include relevant updates. The only limitation going forward is that that there is no plan to backport any future feature additions. That shouldn't be an issue since this library is already pretty much feature complete.
The JDK change was required to replace usages of sun.misc.Unsafe
with VarHandles
, which was released in Java 9. We waited until enough changes warranting a major version bump to do this, so by semver it more clearly allows for backwards incompatible changes.
I hope that eases your concerns. Please continue to use v2 and trust that it will be supported. The releases are performed by github actions so there won't be a mistake of running it locally with the wrong JDK.