On Wed, 28 Jan 2026 07:02:09 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> Invoking `JPopupMenu.setInvoker(null)` causes NPE which is fixed in this PR
>
> Prasanta Sadhukhan has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Test update
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/JPopupMenu/TestPopupInvoker.java line 116:
> 114: if (invoker != null) {
> 115: throw new RuntimeException("Invoker is not null");
> 116: }
Suggestion:
SwingUtilities.invokeAndWait(() -> invoker =
popupMenu.getInvoker());
if (invoker != null) {
throw new RuntimeException("Invoker is not null");
}
These lines comprise a single block. The `invokeAndWait` call has closer
relation to the `if` below rather than to the one above.
-------------
PR Review: https://git.openjdk.org/jdk/pull/29377#pullrequestreview-3716162327
PR Review Comment: https://git.openjdk.org/jdk/pull/29377#discussion_r2736188123