-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-18976 Get rid of dynamic array instantiation in MultiEntityLoader…
…Standard MultiEntityLoaderStandard is used for arbitrary ID types, including IdClass, making it very problematic to instantiate T[] where T is the ID type: in native images, it requires registering T[] for reflection for every T that can possibly be used as an ID type. Fortunately, MultiEntityLoaderStandard does not, in fact, need concrete-type arrays: Object[] works perfectly well with this implementation, and only the other implementation, MultiIdEntityLoaderArrayParam, actually needs concrete-type arrays. We're truly in a lucky streak, because MultiIdEntityLoaderArrayParam is only used for well-known, basic types such as Integer, which can easily be registered for reflection in native images, and likely will be for other reasons anyway. Some of the dynamic instantiations were originally introduced to fix the following issue: * HHH-17201 -- tested in MultiIdEntityLoadTests The corresponding tests still pass after removing these dynamic array instantiations.
- Loading branch information
Showing
4 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters