On Thu, 29 Jun 2023 20:54:31 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove warning tied to String Templates > > src/java.base/share/classes/jdk/internal/util/ReferencedKeySet.java line 65: > >> 63: * replacing the value in the map entry instead of deleting the old >> entry and >> 64: * adding a new entry, otherwise replaced entries may end up with a >> strongly >> 65: * referenced key. {@link HashMap} and {@link ConcurrentHashMap} are >> known > > Can this requirement be backed up with an assert checking for known ok > HashMaps? > It could catch mistakes (in debug builds). It's known to be safe for HashMap and ConcurrentHashMap. Most others should fine but need some thought experiments to work it out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14684#discussion_r1247184193