-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: 8
-
Component/s: core-libs
-
None
I think this can further be boiled down to:
1. Some methods do not clearly specify in which cases they return the original method handle. For example, permuteArguments never returns the original method handle, while dropReturn does so if the original handle already returns void.
2. Some methods explicitly state that the adapted method handle is never variadic. For example filterArguments does so, but if it returns the original handle, it might still be variadic. Other methods do not state whether their (adapted) returned method handle is variadic.
In the case of dropReturn, it can be understood that the operation might return the original handle, but this isn't clear, and the behavior for variadic method handles otherwise is not further specified.
Given that the behavior of returning the original method handle is inconsistent (e.g., insertArguments that doesn't actually insert anything still returns a fixed arity method handle), I think it would make sense to explicitly state the behavior for each of the methods.
1. Some methods do not clearly specify in which cases they return the original method handle. For example, permuteArguments never returns the original method handle, while dropReturn does so if the original handle already returns void.
2. Some methods explicitly state that the adapted method handle is never variadic. For example filterArguments does so, but if it returns the original handle, it might still be variadic. Other methods do not state whether their (adapted) returned method handle is variadic.
In the case of dropReturn, it can be understood that the operation might return the original handle, but this isn't clear, and the behavior for variadic method handles otherwise is not further specified.
Given that the behavior of returning the original method handle is inconsistent (e.g., insertArguments that doesn't actually insert anything still returns a fixed arity method handle), I think it would make sense to explicitly state the behavior for each of the methods.