From 394bd4c6da961a52424b793cd28990559710b83b Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 31 May 2018 10:26:32 +0200 Subject: [PATCH] DATACMNS-1328 - DefaultRepositoryInvokerFactory now uses a ConcurrentHashMap. We now use ConcurrentHashMap to prevent ConcurrentModificationExceptions in multithreaded access to repository invokers. --- .../repository/support/DefaultRepositoryInvokerFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/support/DefaultRepositoryInvokerFactory.java b/src/main/java/org/springframework/data/repository/support/DefaultRepositoryInvokerFactory.java index bd2f3de8f..db8c07b24 100644 --- a/src/main/java/org/springframework/data/repository/support/DefaultRepositoryInvokerFactory.java +++ b/src/main/java/org/springframework/data/repository/support/DefaultRepositoryInvokerFactory.java @@ -16,8 +16,8 @@ package org.springframework.data.repository.support; import java.io.Serializable; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.springframework.core.convert.ConversionService; import org.springframework.data.repository.CrudRepository; @@ -64,7 +64,7 @@ public class DefaultRepositoryInvokerFactory implements RepositoryInvokerFactory this.repositories = repositories; this.conversionService = conversionService; - this.invokers = new HashMap, RepositoryInvoker>(); + this.invokers = new ConcurrentHashMap, RepositoryInvoker>(); } /*