Deal with synthetic and implicit parameters properly when getting the generic type of a parameter

Description

The logic in ReflectionHelper#typeOf(Executable, int) is incorrect.

Take this example:
method(implicit parameter 1, parameter 2, parameter 3)

When trying to get the generic type of parameter 2 with index 1, it will in fact return the type of parameter 3 as parameterIndex >= genericParameterTypes.length is false and genericParameterTypes only contains [parameter 2, parameter 3] as implicit parameters are ignored by getGenericParameterTypes().

All in all, the algorithm of ReflectionHelper#typeOf(Executable, int) always returned a result but it could be an incorrect type.

This method is not used anymore so let's get rid of it. But the logic was copied in JavaBeanExecutable and it requires fixing there.

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Guillaume Smet

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure