diff --git a/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java b/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java index c31ead47c8..a2e41db650 100644 --- a/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java +++ b/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java @@ -16,7 +16,6 @@ package org.springframework.data.auditing; import java.util.Calendar; -import java.util.HashMap; import java.util.Map; import org.springframework.data.annotation.CreatedBy; @@ -30,6 +29,7 @@ import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.PersistentEntities; import org.springframework.util.Assert; +import org.springframework.util.ConcurrentReferenceHashMap; /** * {@link AuditableBeanWrapperFactory} that will create am {@link AuditableBeanWrapper} using mapping information @@ -54,7 +54,7 @@ public MappingAuditableBeanWrapperFactory(PersistentEntities entities) { Assert.notNull(entities, "PersistentEntities must not be null!"); this.entities = entities; - this.metadataCache = new HashMap, MappingAuditingMetadata>(); + this.metadataCache = new ConcurrentReferenceHashMap, MappingAuditingMetadata>(); } /*