Skip to content

Commit 6ecb5ca

Browse files
stuartwdouglasSanne
authored andcommitted
HHH-10338 Use an explicit empty object array to prevent the varargs method allocating one
1 parent 7785097 commit 6ecb5ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hibernate-core/src/main/java/org/hibernate/property/access/spi/EnhancedGetterMethodImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* @author Steve Ebersole
2727
*/
2828
public class EnhancedGetterMethodImpl implements Getter {
29+
30+
private static final Object[] EMPTY = new Object[0];
31+
2932
private static final CoreMessageLogger LOG = messageLogger( EnhancedGetterMethodImpl.class );
3033

3134
private final Class containerClass;
@@ -54,7 +57,7 @@ public Object get(Object owner) {
5457

5558
// We don't want to trigger lazy loading of byte code enhanced attributes
5659
if ( isAttributeLoaded( owner ) ) {
57-
return getterMethod.invoke( owner );
60+
return getterMethod.invoke( owner, EMPTY );
5861
}
5962
return null;
6063

0 commit comments

Comments
 (0)