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 class Component extends SimpleValue implements MetaAttributable, Sortable
|
|||
|
||||
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…
Reference in New Issue