RFR: 8351038: ConcurrentModificationException in EventType constructor

Michael Strauß mstrauss at openjdk.org
Mon Mar 10 10:14:07 UTC 2025


On Wed, 5 Mar 2025 18:40:36 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.

modules/javafx.base/src/main/java/javafx/event/EventType.java line 136:

> 134:      * Internal constructor that skips various checks
> 135:      */
> 136:     private EventType(String name, boolean marker) {

If you name the paramter `ignored`, IntelliJ doesn't flag it as unused.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1729#discussion_r1986985183


More information about the openjfx-dev mailing list