On Mon, 8 Jul 2024 19:12:37 GMT, Joe Darcy <da...@openjdk.org> wrote:
> PS There are cases where cyclic structures are not supported, such as in > java.util.Set: There are algorithms that also don't support that: /** * Returns a hash code based on the "deep contents" of the specified * array. If the array contains other arrays as elements, the * hash code is based on their contents and so on, ad infinitum. * It is therefore unacceptable to invoke this method on an array that * contains itself as an element, either directly or indirectly through * one or more levels of arrays. The behavior of such an invocation is * undefined. ... */ public static int deepHashCode(Object[] a) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20063#discussion_r1669161910