Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/main/java/com/ql/util/express/ExpressRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class ExpressRunner {
* 一段文本对应的指令集的缓存
* default: ConcurrentHashMap with no eviction policy
*/
private final Map<String, Future<InstructionSet>> expressInstructionSetCache;
private static final Map<String, Future<InstructionSet>> expressInstructionSetCache = new ConcurrentHashMap<>();;

private final ExpressLoader loader;

Expand Down Expand Up @@ -165,10 +165,8 @@ public ExpressRunner(boolean isPrecise, boolean isTrace, IExpressResourceLoader
manager = nodeTypeManager;
}

if (Objects.isNull(cacheMap)) {
expressInstructionSetCache = new ConcurrentHashMap<>();
} else {
expressInstructionSetCache = cacheMap;
if (!Objects.isNull(cacheMap)) {
expressInstructionSetCache.putAll(cacheMap);
}
this.operatorManager = new OperatorFactory(this.isPrecise);
this.loader = new ExpressLoader(this);
Expand Down