mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
Fix race condition that allowed Component.getType() to return null (#4700)
This fix prevents an NPE in org.hibernate.mapping.SimpleValue.isValid() and likely elsewhere
This commit is contained in:
parent
cc0b198142
commit
751aa6f50f
@ -196,7 +196,8 @@ public Type getType() throws MappingException {
|
||||
|
||||
if ( localType == null ) {
|
||||
synchronized ( this ) {
|
||||
if ( type == null ) {
|
||||
localType = type;
|
||||
if ( localType == null ) {
|
||||
// Make sure this is sorted which is important especially for synthetic components
|
||||
// Other components should be sorted already
|
||||
sortProperties( true );
|
||||
|
Loading…
x
Reference in New Issue
Block a user