From da96dda202d422467db17a9c6b6fbefd16b33dca Mon Sep 17 00:00:00 2001 From: Yuba Date: Fri, 30 Aug 2024 10:32:43 +0900 Subject: [PATCH] refs#1496 ConcurrentModificationException when resolved a new classname --- framework/src/play/classloading/ApplicationClassloader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/play/classloading/ApplicationClassloader.java b/framework/src/play/classloading/ApplicationClassloader.java index da1ac216ca..ee706be905 100644 --- a/framework/src/play/classloading/ApplicationClassloader.java +++ b/framework/src/play/classloading/ApplicationClassloader.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; @@ -488,7 +489,7 @@ public List getAssignableClasses(Class clazz) { } // assignable classes cache - private final Map> assignableClassesByName = new HashMap<>(100); + private final Map> assignableClassesByName = new ConcurrentHashMap<>(100); /** * Find a class in a case insensitive way