@@ -464,7 +464,7 @@ public abstract class AbstractEntityPersister
464
464
private final boolean implementsLifecycle ;
465
465
466
466
private List <UniqueKeyEntry > uniqueKeyEntries = null ; //lazily initialized
467
- private HashMap <String ,SingleIdArrayLoadPlan > nonLazyPropertyLoadPlansByName ;
467
+ private ConcurrentHashMap <String ,SingleIdArrayLoadPlan > nonLazyPropertyLoadPlansByName ;
468
468
469
469
public AbstractEntityPersister (
470
470
final PersistentClass persistentClass ,
@@ -1548,17 +1548,17 @@ protected Object initializeLazyPropertiesFromDatastore(
1548
1548
int propertyIndex = getPropertyIndex ( fieldName );
1549
1549
partsToSelect .add ( getAttributeMapping ( propertyIndex ) );
1550
1550
SingleIdArrayLoadPlan lazyLoanPlan ;
1551
- if ( nonLazyPropertyLoadPlansByName == null ) {
1552
- nonLazyPropertyLoadPlansByName = new HashMap <>();
1551
+ ConcurrentHashMap <String , SingleIdArrayLoadPlan > propertyLoadPlansByName = this .nonLazyPropertyLoadPlansByName ;
1552
+ if ( propertyLoadPlansByName == null ) {
1553
+ propertyLoadPlansByName = new ConcurrentHashMap <>();
1553
1554
lazyLoanPlan = createLazyLoanPlan ( partsToSelect );
1554
- ;
1555
- nonLazyPropertyLoadPlansByName . put ( fieldName , lazyLoanPlan ) ;
1555
+ propertyLoadPlansByName . put ( fieldName , lazyLoanPlan ) ;
1556
+ this . nonLazyPropertyLoadPlansByName = propertyLoadPlansByName ;
1556
1557
}
1557
1558
else {
1558
1559
lazyLoanPlan = nonLazyPropertyLoadPlansByName .get ( fieldName );
1559
1560
if ( lazyLoanPlan == null ) {
1560
1561
lazyLoanPlan = createLazyLoanPlan ( partsToSelect );
1561
- ;
1562
1562
nonLazyPropertyLoadPlansByName .put ( fieldName , lazyLoanPlan );
1563
1563
}
1564
1564
}
0 commit comments