RFR: 8378354: Faulty assertion in checkInvariants method of ConcurrentHashMap
cdw200806
duke at openjdk.org
Fri Feb 20 20:26:46 UTC 2026
On Fri, 20 Feb 2026 20:02:06 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Please describe the semantic impact of the violated assertion. Would it ever be observable?
If concurrent map use red-black-tree correctly(or use it normally as common red-balck-tree algorithm), this bug will never be observable.
In the logic, It just like the old code assert 1 is a Object, but I fix it to 1 is a Integer. More correctly( if 1 is a String it will throw error) , but the old code is not a "bug" , will never throw error(if the tree is build and use correct). I find it by code review.
This assert just like a ut lack some of branch,a ut not perfect, if the red-black-tree operation code is wrong and some case not as expect happen and it will not aware,but if the code run correctly, maybe it not need to fix, it decide by your team.
@RogerRiggs
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24612#issuecomment-3936977232
More information about the core-libs-dev
mailing list