Skip to content

Commit 9fd266f

Browse files
authored
fix: fix hashmap thread unsafe (casbin#299)
Signed-off-by: imp2002 <[email protected]> Signed-off-by: imp2002 <[email protected]>
1 parent f43e679 commit 9fd266f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/casbin/jcasbin/util/BuiltInFunctions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public static class GenerateGFunctionClass {
345345
* @return the function.
346346
*/
347347
public static AviatorFunction generateGFunction(String name, RoleManager rm) {
348-
memorizedMap.put(name, new HashMap<>());
348+
memorizedMap.put(name, new ConcurrentHashMap<>());
349349

350350
return new AbstractVariadicFunction() {
351351
@Override

0 commit comments

Comments
 (0)