Skip to content

Commit 3f05464

Browse files
committed
HHH-18976 Replace unnecessary dynamic array instantiations with calls to new Object[]
The dynamic instantiations were originally introduced to fix the following issues: * HHH-17201 -- tested in MultiIdEntityLoadTests The corresponding tests still pass after removing these dynamic array instantiations.
1 parent 689e749 commit 3f05464

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hibernate-core/src/main/java/org/hibernate/internal/MultiIdentifierLoadAccessImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.hibernate.graph.GraphSemantic;
2020
import org.hibernate.graph.RootGraph;
2121
import org.hibernate.graph.spi.RootGraphImplementor;
22-
import org.hibernate.loader.ast.internal.LoaderHelper;
2322
import org.hibernate.persister.entity.EntityPersister;
2423
import org.hibernate.loader.ast.spi.MultiIdLoadOptions;
2524

@@ -191,7 +190,7 @@ public <K> List<T> multiLoad(List<K> ids) {
191190
}
192191
else {
193192
return perform( () -> (List<T>) entityPersister.multiLoad(
194-
ids.toArray( LoaderHelper.createTypedArray( ids.get( 0 ).getClass(), ids.size() ) ),
193+
ids.toArray( new Object[0] ),
195194
session,
196195
this
197196
) );

0 commit comments

Comments
 (0)