Skip to content

Commit

Permalink
fix: hopeful fix to concurrent modification exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Idane committed Feb 17, 2023
1 parent f62c0dd commit 1ec3a81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class CrudHelperImpl implements CrudHelper, InitializingBean {
* Others
*/

private final Map<Class<? extends BaseCrudEntity<?>>, CrudDao> crudDaoMap = new HashMap<>();
private final Map<Class<? extends BaseCrudEntity<?>>, CrudDao> crudDaoMap = new ConcurrentHashMap<>();

private final Map<Class<? extends BaseCrudEntity<?>>, EntityMetadataDTO> entityMetadataDTOs = new ConcurrentHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import org.springframework.beans.factory.ObjectProvider
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
import java.security.Principal
import java.util.concurrent.ConcurrentHashMap

internal class CrudSecurityHandlerImpl(
private val policies: ObjectProvider<Policy<PersistentEntity>>,
private val principalProvider: ObjectProvider<PrincipalProvider>
) : CrudSecurityHandler, InitializingBean {
private val policyMap = mutableMapOf<Class<*>, MutableList<Policy<PersistentEntity>>>()
private val policyMap = ConcurrentHashMap<Class<*>, MutableList<Policy<PersistentEntity>>>()
@Autowired
private lateinit var applicationContext: ApplicationContext

Expand Down

0 comments on commit 1ec3a81

Please sign in to comment.