RFR: 8306698: Add overloads to MethodTypeDesc::of
ExE Boss
duke at openjdk.org
Sun Apr 23 13:09:43 UTC 2023
On Sat, 22 Apr 2023 16:31:31 GMT, Chen Liang <liach at openjdk.org> wrote:
> Please review this patch adding two new convenience methods that allows easier access to MethodTypeDesc instances and its associated CSR as well. This is a necessity to allow #13186 to reduce array copies in a few scenarios; the implementation of the two methods will be updated there.
Changes requested by ExE-Boss at github.com (no known OpenJDK username).
src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java line 85:
> 83: * @since 21
> 84: */
> 85: static MethodTypeDesc of(ClassDesc returnDesc, Collection<ClassDesc> paramDescs) {
This needs to be:
Suggestion:
static MethodTypeDesc of(ClassDesc returnDesc, List<ClassDesc> paramDescs) {
as `Collection` doesn’t have a defined encounter order.
-------------
PR Review: https://git.openjdk.org/jdk/pull/13599#pullrequestreview-1396907204
PR Review Comment: https://git.openjdk.org/jdk/pull/13599#discussion_r1174578085
More information about the core-libs-dev
mailing list