On Fri, 6 Sep 2024 11:56:18 GMT, Chen Liang <[email protected]> wrote:
>> Claes Redestad has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Explicitly cast to Object
>
> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line
> 1257:
>
>> 1255: if (handlePair != null) {
>> 1256: try {
>> 1257: var instance =
>> handlePair.constructor.invokeBasic(constants);
>
> Hmm, `invokeBasic` notes ask to call with plain `Object` but `constants` is a
> `Object[]`... Don't know how that really worked out. Should we explicitly
> cast to `Object` as javac treats this as a sigpoly method (using the
> invocation type)?
I tried with/without `(Object)constants` and didn't see any difference in
instrumentation. It makes it more obviously correct so I'll add it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20884#discussion_r1747007864