On Wed, 9 Sep 2026 14:49:22 GMT, Fabian Meumertzheim <[email protected]> wrote:

> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Setting head to null in the clone method looks right. Seems to an issue since 
[JDK-8186226](https://bugs.openjdk.org/browse/JDK-8186226) in JDK 10. I assume 
this has not been noticed because it's so rare to use clone (aside from 
arrays), and it looks like this requires clearing a non-empty map before 
cloning.

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

PR Comment: https://git.openjdk.org/jdk/pull/32795#issuecomment-5667808131

Reply via email to