On Wed, 3 Dec 2025 10:31:07 GMT, Per Minborg <[email protected]> wrote:

>> MethodHandle is immutable and can be safely published. So this is ok.
>
> I meant that even though objects are immutable, plain semantics might not 
> always do. 
> 
> Reference: https://shipilev.net/blog/2014/safe-public-construction/

MethodHandle is safe. All fields in Method Handle hierarchies are either 
lazy/stable or final. You can refer to the `invokers` field in `MethodType`, 
and the `MethodHandle` array in `Invokers` for precedents.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2585263336

Reply via email to