On Mon, 12 Jan 2026 18:36:33 GMT, Hannes Greule <[email protected]> wrote:
> A simple correction to the javadocs of `MethodHandles.constant(...)`. Please
> review and let me know what you think.
(see previous comment)
Good catch; that is more correct, since it covers primitive types.
I would prefer to keep the bind-to language, since it teaches about that API
point as well.
Should be:
* <p>The returned method handle is equivalent to {@code
identity(type).bindTo(value)},
* for reference types. For all types it is equivalent to
* {@code insertArguments(identity(type), 0, value)}.
-------------
Changes requested by jrose (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29174#pullrequestreview-3679849448
PR Comment: https://git.openjdk.org/jdk/pull/29174#issuecomment-3770398331