I have been reading https://www.alibabacloud.com/blog/the-clever-design-of-java-map_597979 for the internal implementation of the HashMap
and CHM
.
There is an interesting line for which I could not find more explanation for :
Can someone point me to the bug this refers to?
I could only find the bug related to HashMap
improvement with RB-Trees, but nothing about the dead loop.
https://github.com/openjdk/jdk/commit/0fb014c2b3cff00c15e9e7cb6653818d061216e9
https://bugs.openjdk.org/browse/JDK-8023463
>Solution :
Here is the bug in JDK tracker: https://bugs.openjdk.org/browse/JDK-7027300
And the similar question was answered in Java HashMap.get(Object) infinite loop. Here is the link to exact place in the code causing the issue: https://stackoverflow.com/a/44180452/12473843
P.S. This one is for CHM: https://bugs.openjdk.org/browse/JDK-8142175