Skip to content

Commit

Permalink
Revert "HHH-14869 Fix CallbackRegistryImpl#registerCallbacks consider…
Browse files Browse the repository at this point in the history
…ing all given callbacks have the same type"

This reverts commit 8afce5b.
  • Loading branch information
euano committed Aug 20, 2024
1 parent 30241bb commit de96b98
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ public void registerCallbacks(Class entityClass, Callback[] callbacks) {
return;
}

for ( Callback callback : callbacks ) {
final HashMap<Class, Callback[]> map = determineAppropriateCallbackMap( callback.getCallbackType() );
Callback[] entityCallbacks = map.get( entityClass );
if ( entityCallbacks == null ) {
entityCallbacks = new Callback[0];
}
entityCallbacks = ArrayHelper.join( entityCallbacks, callback );
map.put( entityClass, entityCallbacks );
final HashMap<Class, Callback[]> map = determineAppropriateCallbackMap( callbacks[0].getCallbackType() );
Callback[] entityCallbacks = map.get( entityClass );

if ( entityCallbacks != null ) {
callbacks = ArrayHelper.join( entityCallbacks, callbacks );
}
map.put( entityClass, callbacks );
}

@Override
Expand Down

0 comments on commit de96b98

Please sign in to comment.