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

This commit is contained in:
haiming yu 2022-06-22 09:58:36 +08:00
parent dce3adaae2
commit 8eb8aef04d

View File

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