mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -24,7 +24,7 @@ public enum GlobalPruneTimer {
|
||||
/**
|
||||
* 缓存任务计数
|
||||
*/
|
||||
private AtomicInteger cacheTaskNumber = new AtomicInteger(1);
|
||||
private final AtomicInteger cacheTaskNumber = new AtomicInteger(1);
|
||||
|
||||
/**
|
||||
* 定时器
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package cn.hutool.cache.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import cn.hutool.cache.Cache;
|
||||
import cn.hutool.core.lang.func.Func0;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* 无缓存实现,用于快速关闭缓存
|
||||
*
|
||||
@@ -61,7 +61,17 @@ public class NoCache<K, V> implements Cache<K, V> {
|
||||
|
||||
@Override
|
||||
public Iterator<V> iterator() {
|
||||
return null;
|
||||
return new Iterator<V>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V next() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user