Avoid allocation of empty vararg arrays for reflective invocations without parameters

Description

The reflective helper

, which is quite hot in various code points across Hibernate to read the value from getter methods, has the invoker implicitly allocate an empty array to be passed to the vararg supporting argument when there are no arguments.

In most cases we'll invoke these helpers without expecting any argument, so it's worth adding an overloaded method which optimises for the common use case.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Affects versions

Priority

Major
Configure