Skip to content

Commit 971dd27

Browse files
committed
HHH-18632 Concurrency issue with AbstractEntityPersister#nonLazyPropertyLoadPlansByName
1 parent 4fbc8f9 commit 971dd27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public abstract class AbstractEntityPersister
464464
private final boolean implementsLifecycle;
465465

466466
private List<UniqueKeyEntry> uniqueKeyEntries = null; //lazily initialized
467-
private HashMap<String,SingleIdArrayLoadPlan> nonLazyPropertyLoadPlansByName;
467+
private ConcurrentHashMap<String,SingleIdArrayLoadPlan> nonLazyPropertyLoadPlansByName;
468468

469469
public AbstractEntityPersister(
470470
final PersistentClass persistentClass,
@@ -1553,9 +1553,8 @@ protected Object initializeLazyPropertiesFromDatastore(
15531553
partsToSelect.add( getAttributeMapping( propertyIndex ) );
15541554
SingleIdArrayLoadPlan lazyLoanPlan;
15551555
if ( nonLazyPropertyLoadPlansByName == null ) {
1556-
nonLazyPropertyLoadPlansByName = new HashMap<>();
1556+
nonLazyPropertyLoadPlansByName = new ConcurrentHashMap<>();
15571557
lazyLoanPlan = createLazyLoanPlan( partsToSelect );
1558-
;
15591558
nonLazyPropertyLoadPlansByName.put( fieldName, lazyLoanPlan );
15601559
}
15611560
else {

0 commit comments

Comments
 (0)