This bug existed before 21, but [JDK-8286470](https://bugs.openjdk.org/browse/JDK-8286470) triggered it and caused some strange and possibly non-deterministic ordering of items in the JavaDoc index pages, which caused failures reported in [JDK-8309233](https://bugs.openjdk.org/browse/JDK-8309233). Since the fix is fairly simple I think it should be backported to 21.
------------- Commit messages: - Backport 0741cd3289ccc89777449711ab20d6c32711f494 Changes: https://git.openjdk.org/jdk21/pull/100/files Webrev: https://webrevs.openjdk.org/?repo=jdk21&pr=100&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311264 Stats: 124 lines in 4 files changed: 88 ins; 9 del; 27 mod Patch: https://git.openjdk.org/jdk21/pull/100.diff Fetch: git fetch https://git.openjdk.org/jdk21.git pull/100/head:pull/100 PR: https://git.openjdk.org/jdk21/pull/100