HHH-15325 Avoid allocations from BitSet.stream() in AbstractEntityPersister
This commit is contained in:
parent
4d070f24f9
commit
6a227b5ee2
|
@ -2542,7 +2542,7 @@ public abstract class AbstractEntityPersister
|
|||
// We have to check the state for "mutable" properties as dirty tracking isn't aware of mutable types
|
||||
final Type[] propertyTypes = entityMetamodel.getPropertyTypes();
|
||||
final boolean[] propertyCheckability = entityMetamodel.getPropertyCheckability();
|
||||
mutablePropertiesIndexes.stream().forEach( i -> {
|
||||
for ( int i = mutablePropertiesIndexes.nextSetBit(0); i >= 0; i = mutablePropertiesIndexes.nextSetBit(i + 1) ) {
|
||||
// This is kindly borrowed from org.hibernate.type.TypeHelper.findDirty
|
||||
final boolean dirty = currentState[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY &&
|
||||
// Consider mutable properties as dirty if we don't have a previous state
|
||||
|
@ -2557,7 +2557,7 @@ public abstract class AbstractEntityPersister
|
|||
if ( dirty ) {
|
||||
fields.add( i );
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
if ( attributeNames.length != 0 ) {
|
||||
|
|
Loading…
Reference in New Issue