diff --git a/backend/data/src/main/kotlin/io/tolgee/activity/iterceptor/InterceptedEventsManager.kt b/backend/data/src/main/kotlin/io/tolgee/activity/iterceptor/InterceptedEventsManager.kt index 54dae5e62d..24acdf47ce 100644 --- a/backend/data/src/main/kotlin/io/tolgee/activity/iterceptor/InterceptedEventsManager.kt +++ b/backend/data/src/main/kotlin/io/tolgee/activity/iterceptor/InterceptedEventsManager.kt @@ -21,7 +21,7 @@ import io.tolgee.security.ProjectHolder import io.tolgee.security.ProjectNotSelectedException import io.tolgee.security.authentication.AuthenticationFacade import jakarta.persistence.EntityManager -import org.apache.commons.lang3.exception.ExceptionUtils.* +import org.apache.commons.lang3.exception.ExceptionUtils.getRootCause import org.hibernate.Transaction import org.hibernate.action.spi.BeforeTransactionCompletionProcess import org.hibernate.collection.spi.AbstractPersistentCollection @@ -31,6 +31,7 @@ import org.springframework.beans.factory.config.BeanDefinition.SCOPE_SINGLETON import org.springframework.context.ApplicationContext import org.springframework.context.annotation.Scope import org.springframework.stereotype.Component +import java.util.concurrent.ConcurrentHashMap import kotlin.reflect.KCallable import kotlin.reflect.full.findAnnotation import kotlin.reflect.full.hasAnnotation @@ -250,8 +251,8 @@ class InterceptedEventsManager( } } - private val annotatedMembersCache: MutableMap, Map> = mutableMapOf() - private val ignoredMembersCache: MutableMap, Set> = mutableMapOf() + private val annotatedMembersCache: ConcurrentHashMap, Map> = ConcurrentHashMap() + private val ignoredMembersCache: ConcurrentHashMap, Set> = ConcurrentHashMap() private fun shouldHandleActivity(entity: Any?) = entity is EntityWithId && entity::class.hasAnnotation() &&