ObjectMethods seems generating wrong methods for array-type field

Kengo TODA skypencil at gmail.com
Wed Apr 14 01:04:49 UTC 2021

Hello there,

I'm Kengo TODA, an engineer learning about the Record feature.
Today I found a nonintentional behavior, and it seems that the bug database
has no info about it.
Let me ask here to confirm it's by-design or not. If it's a bug, I want to
try to send a patch to OpenJDK.

Here is the code reproducing the nonintentional behavior:

In short, the ObjectMethods class in OpenJDK v16 generates code
that invokes the fields' method, even when the field is an array.

Please help me to understand this behavior, or
make an entry in the bug database to propose a patch.
Thanks in advance! :)

Kengo TODA
skypencil at gmail.com

More information about the core-libs-dev mailing list