On Thu, 22 May 2025 21:21:30 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
> The issue was found here: > https://github.com/openjdk/jdk/pull/24692#discussion_r2089545502 > > AWTEventListener and AWTEventListenerProxy are public classes and there's no > assertion that EventListenerProxy.getListener() will always return a non-null > value. So removeAWTEventListener 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. > > One of the test is updated just to touch that codepath. This pull request has now been integrated. Changeset: 3a3ea7e1 Author: Sergey Bylokhov <s...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/3a3ea7e17fff100e368c956350bb9aaa2261b8a9 Stats: 48 lines in 2 files changed: 28 ins; 15 del; 5 mod 8357598: Toolkit.removeAWTEventListener should handle null listener in AWTEventListenerProxy Reviewed-by: aivanov, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/25401