Add synchronization to CoerceJavaToLua.COERCIONS map.

This commit is contained in:
James Roseborough
2018-09-13 11:53:24 +02:00
parent 828e4be019
commit 194b776317
2 changed files with 3 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
******************************************************************************/
package org.luaj.vm2.lib.jse;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -133,7 +134,7 @@ public class CoerceJavaToLua {
}
static final Map COERCIONS = new HashMap();
static final Map COERCIONS = Collections.synchronizedMap(new HashMap());
static {
Coercion boolCoercion = new BoolCoercion() ;