On Mon, 19 May 2025 12:23:27 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Looks like yes. I think it's worth to create a separate issue to fix it.
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24692#discussion_r2098669264

Reply via email to