On Thu, 14 Nov 2024 23:15:14 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> additional comments > > modules/javafx.graphics/src/main/java/com/sun/javafx/tk/Toolkit.java line 375: > >> 373: // than a HashSet of WeakReferences so that the entries are >> automatically >> 374: // removed after the listener is garbage collected. >> 375: private final Map<TKPulseListener,Object> stagePulseListeners = new >> WeakHashMap<>(); > > I recommend using a set instead of a map, which is a bit less confusing: > > private final Set<TKPulseListener> stagePulseListeners = > Collections.newSetFromMap(new WeakHashMap<>()) Good suggestion. I made this change. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1638#discussion_r1844984078