HHH-10338 Use an explicit empty object array to prevent the varargs method allocating one

This commit is contained in:
Stuart Douglas 2015-11-21 10:53:45 +11:00 committed by Sanne Grinovero
parent 77850972b6
commit 6ecb5ca923
1 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,9 @@ import static org.hibernate.internal.CoreLogging.messageLogger;
* @author Steve Ebersole
*/
public class EnhancedGetterMethodImpl implements Getter {
private static final Object[] EMPTY = new Object[0];
private static final CoreMessageLogger LOG = messageLogger( EnhancedGetterMethodImpl.class );
private final Class containerClass;
@ -54,7 +57,7 @@ public class EnhancedGetterMethodImpl implements Getter {
// We don't want to trigger lazy loading of byte code enhanced attributes
if ( isAttributeLoaded( owner ) ) {
return getterMethod.invoke( owner );
return getterMethod.invoke( owner, EMPTY );
}
return null;