<AWT Dev> [12] RFR : JDK-8198001 : java/awt/Menu/WrongParentAfterRemoveMenu/WrongParentAfterRemoveMenu.java debug assert on Windows

Ambarish Rapte ambarish.rapte at oracle.com
Mon Oct 29 16:29:48 UTC 2018



Please review this windows only fix:

JBS: https://bugs.openjdk.java.net/browse/JDK-8198001

Webrev: http://cr.openjdk.java.net/~arapte/8198001/webrev.00/



Test asserts with debug build jdk, only on windows.
This test fails when Menu is removed from MenuBar (WrongParentAfterRemoveMenu.java  :: Line no 100)
Assert at Line no. 209, awt_MenuBar.cpp :: RedrawMenuBar()
AwtMenuBar::DeleteItem() ->  AwtMenuBar::RedrawMenuBar()  => calls GetOwnerHWnd() which returns NULL.


Fix:  Value returned by GetOwnerHWnd() should be checked for NULL value.


Verification: All MenuBar tests pass.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20181029/cb21e33e/attachment.html>

More information about the awt-dev mailing list