HHH-14869 Fix CallbackRegistryImpl#registerCallbacks considering all given callbacks have the same type
This commit is contained in:
parent
965f5bd925
commit
8afce5b5ed
|
@ -41,13 +41,15 @@ final class CallbackRegistryImpl implements CallbackRegistryImplementor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final HashMap<Class, Callback[]> map = determineAppropriateCallbackMap( callbacks[0].getCallbackType() );
|
for ( Callback callback : callbacks ) {
|
||||||
|
final HashMap<Class, Callback[]> map = determineAppropriateCallbackMap( callback.getCallbackType() );
|
||||||
Callback[] entityCallbacks = map.get( entityClass );
|
Callback[] entityCallbacks = map.get( entityClass );
|
||||||
|
if ( entityCallbacks == null ) {
|
||||||
if ( entityCallbacks != null ) {
|
entityCallbacks = new Callback[0];
|
||||||
callbacks = ArrayHelper.join( entityCallbacks, callbacks );
|
}
|
||||||
|
entityCallbacks = ArrayHelper.join( entityCallbacks, callback );
|
||||||
|
map.put( entityClass, entityCallbacks );
|
||||||
}
|
}
|
||||||
map.put( entityClass, callbacks );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue