On Tue, 20 May 2025 18:59:33 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> It doesn't matter, it looks… `localL` is `null` if and only if listener is >> `null`. >> >> However, I'd put the null-check above the call to `deProxyAWTEventListener` >> to avoid any confusion. > > listener and proxy are public classes and there's no assertion that > EventListenerProxy.getListener() will always return a non-null value. So this > method should fetch the listener from the proxy and check it for null similar > to how it is implemented in addAWTEventListener. Currently, it works fine > because we never insert null values into the map. so it is just a code > clarification. You're right! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24692#discussion_r2098766802