From 07c9c90b65a4077af0595fc08d290740dff632cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Tue, 3 Apr 2018 15:15:11 +0300 Subject: [PATCH] Use synchronized hash map instead of ConcurrentHashMap in LazyModule refs #7826 Change-Id: I660f5f3312a7d1db49441f02d55864e36c950d74 (cherry picked from commit fca6027f6beef8081d719b078e80b98fb56f7a8a) --- .../org/simantics/scl/compiler/module/LazyModule.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/LazyModule.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/LazyModule.java index 41aff8d31..dc1e40e73 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/LazyModule.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/LazyModule.java @@ -2,8 +2,9 @@ package org.simantics.scl.compiler.module; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.List; -import java.util.concurrent.ConcurrentHashMap; +import java.util.Map; import org.simantics.scl.compiler.constants.Constant; import org.simantics.scl.compiler.elaboration.chr.CHRRuleset; @@ -27,9 +28,9 @@ import gnu.trove.map.hash.THashMap; public abstract class LazyModule implements Module { private final String moduleName; - private final ConcurrentHashMap values = new ConcurrentHashMap(); - private final ConcurrentHashMap relations = new ConcurrentHashMap(); - private final ConcurrentHashMap entityTypes = new ConcurrentHashMap(); + private final Map values = Collections.synchronizedMap(new HashMap()); + private final Map relations = Collections.synchronizedMap(new HashMap()); + private final Map entityTypes = Collections.synchronizedMap(new HashMap()); protected abstract SCLValue createValue(String name); -- 2.47.1