RFR: 8342993: Remove uses of AccessController and AccessControlContext from JavaFX [v2]
Kevin Rushforth
kcr at openjdk.org
Sat Nov 16 17:29:47 UTC 2024
On Thu, 14 Nov 2024 23:15:14 GMT, Michael Strauß <mstrauss at 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
More information about the openjfx-dev
mailing list