RFR: 8351038: ConcurrentModificationException in EventType constructor [v2]
Ambarish Rapte
arapte at openjdk.org
Tue Mar 18 16:48:13 UTC 2025
On Mon, 10 Mar 2025 14:31:33 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> - synchronized `EventType::register()` method
>> - simplified internal constructor which is only used for `EventType.ROOT`
>>
>> There should negligent impact on performance when `EventTypes` are created in the FX Application Thread.
>>
>> There might be a distant potential for a deadlock if the application wraps code that creates `EventTypes` in a block synchronized on a different object.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - ignored
> - Merge remote-tracking branch 'origin/master' into 8351038.event.type
> - test
> - synchronized
LGTM, with a minor suggestion.
modules/javafx.base/src/test/java/test/javafx/event/EventTypeConcurrencyTest.java line 47:
> 45: try {
> 46: ArrayList<Callable<Object>> runs = new ArrayList<>(N);
> 47: for(int i=0; i<N; i++) {
minor : formatting : `for (int i = 0; i < N; i++) {`
-------------
Marked as reviewed by arapte (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/1729#pullrequestreview-2695383674
PR Review Comment: https://git.openjdk.org/jfx/pull/1729#discussion_r2001499370
More information about the openjfx-dev
mailing list