!34 fix:long或者Long初始赋值时,必须使用大写的L,不能是小写的l,小写容易跟数字1混淆,造成误解。

Merge pull request !34 from TomYule/master
This commit is contained in:
Wendal 2022-06-22 03:20:26 +00:00 committed by Gitee
commit c325bbe847
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -116,8 +116,8 @@ public class CaffeineInterceptor implements MethodInterceptor {
try {
String[] values = entry.getValue().replace(" ", ",").split(",");
long maxSize = Long.parseLong(values[0].trim());
long maxIdle = values.length > 1 ? Long.parseLong(values[1].trim()) : 0l;
long maxLive = values.length > 2 ? Long.parseLong(values[2].trim()) : 0l;
long maxIdle = values.length > 1 ? Long.parseLong(values[1].trim()) : 0L;
long maxLive = values.length > 2 ? Long.parseLong(values[2].trim()) : 0L;
CacheStrategy cacheStrategy = new CacheStrategy(split[1].trim(), maxSize, maxIdle, maxLive);
cacheStrategyMap.put(cacheStrategy.getName(), cacheStrategy);
log.debugf("load CacheStrategy %s", cacheStrategy);