<html><body><p><tt><font size="2">Hi Sergey,</font></tt><br><br><tt><font size="2">> One small question about the test, is it necessary to check macOS only?</font></tt><br><br><tt><font size="2">Yes. Keyboard operations by robot are easy to reproduce the problem, but</font></tt><br><tt><font size="2">Keyboard don't work for Choice component in other platforms, such as</font></tt><br><tt><font size="2">Windows, Linux, Solaris, or AIX. So, I think mac only is appropriate.</font></tt><br><br><tt><font size="2">By the way, I found pair of keyPress and keyRelease events by robot</font></tt><br><tt><font size="2">are required in some cases. I'd like to update the testcase to webrev.03.</font></tt><br><br><a href="http://cr.openjdk.java.net/~tnakamura/8234386/webrev.03"><tt><font size="2">http://cr.openjdk.java.net/~tnakamura/8234386/webrev.03</font></tt></a><br><br><tt><font size="2">Thanks,</font></tt><br><tt><font size="2">Toshio Nakamura</font></tt><br><br><tt><font size="2">Sergey Bylokhov <Sergey.Bylokhov@oracle.com> wrote on 2019/11/24 05:19:36:<br><br>> From: Sergey Bylokhov <Sergey.Bylokhov@oracle.com></font></tt><br><tt><font size="2">> To: Toshio 5 Nakamura <TOSHIONA@jp.ibm.com></font></tt><br><tt><font size="2">> Cc: swing-dev@openjdk.java.net</font></tt><br><tt><font size="2">> Date: 2019/11/24 05:19</font></tt><br><tt><font size="2">> Subject: [EXTERNAL] Re: <Swing Dev> RFR: JDK-8234386: [macos] NPE <br>> was thrown at expanding Choice from maximized frame</font></tt><br><tt><font size="2">> <br>> One small question about the test, is it necessary to check macOS only?<br>> I assume the code will work on any platform?<br>> <br>> On 11/21/19 5:06 pm, Toshio 5 Nakamura wrote:<br>> > Hi Sergey,<br>> > <br>> > Thank you for the comment.<br>> > Please find webrev.02.<br>> > <a href="http://cr.openjdk.java.net/~tnakamura/8234386/webrev.02">http://cr.openjdk.java.net/~tnakamura/8234386/webrev.02</a> <br>> > <br>> > Thanks,<br>> > Toshio Nakamura<br>> > <br>> > Sergey Bylokhov <Sergey.Bylokhov@oracle.com> wrote on 2019/11/22 07:07:03:<br>> > <br>> > > From: Sergey Bylokhov <Sergey.Bylokhov@oracle.com><br>> > > To: Toshio 5 Nakamura <TOSHIONA@jp.ibm.com><br>> > > Cc: swing-dev@openjdk.java.net<br>> > > Date: 2019/11/22 07:07<br>> > > Subject: [EXTERNAL] Re: <Swing Dev> RFR: JDK-8234386: [macos] NPE<br>> > > was thrown at expanding Choice from maximized frame<br>> > ><br>> > > It looks like after the .01 version you can inline the usage of<br>> > > Toolkit.getDefaultToolkit(), it is only used inside<br>> > > "if (!canPopupOverlapTaskBar()) {".<br>> > ><br>> > > On 11/21/19 5:10 am, Toshio 5 Nakamura wrote:<br>> > > > Hi Sergey,<br>> > > ><br>> > > > Thank you for the review.<br>> > > > How about the fix in webrev.01?<br>> > > ><br>> > > > To calculate Insets of default screen could be same as to set gc<br>> > > of default screen device, I think.<br>> > > > I found similar code in RepaintManager.<br>> > > ><br>> > > > <a href="http://cr.openjdk.java.net/~tnakamura/8234386/webrev.01">http://cr.openjdk.java.net/~tnakamura/8234386/webrev.01</a> <br>> > > ><br>> > > > Thanks,<br>> > > > Toshio Nakamura<br>> > > ><br>> > > > Sergey Bylokhov <Sergey.Bylokhov@oracle.com> wrote on 2019/<br>> 11/21 17:42:39:<br>> > > ><br>> > > > > From: Sergey Bylokhov <Sergey.Bylokhov@oracle.com><br>> > > > > To: Toshio 5 Nakamura <TOSHIONA@jp.ibm.com>, swing-<br>> dev@openjdk.java.net<br>> > > > > Date: 2019/11/21 17:42<br>> > > > > Subject: [EXTERNAL] Re: <Swing Dev> RFR: JDK-8234386: [macos] NPE<br>> > > > > was thrown at expanding Choice from maximized frame<br>> > > > ><br>> > > > > Hi, Toshio.<br>> > > > ><br>> > > > > In a few lines above your fix, the code takes care of null GC<br>> > > and use the main<br>> > > > > screen size as a screen bound, so I think your change <br>> should calculate<br>> > > > > Insets for the main screen as well instead of using zeros.<br>> > > > ><br>> > > > > BTW probably GraphicsEnvironment.getMaximumWindowBounds() <br>> couldbe used at<br>> > > > > line 336 additionally to your fix.<br>> > > > ><br>> > > > > On 11/19/19 7:55 pm, Toshio 5 Nakamura wrote:<br>> > > > > > Hi All,<br>> > > > > ><br>> > > > > > Could you review the following fix? Also, I'd like to ask a<br>> > > > > sponsor of this fix, since I'm not a committer.<br>> > > > > ><br>> > > > > > Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8234386">https://bugs.openjdk.java.net/browse/JDK-8234386</a><br>> > > > > > Webrev: <a href="http://cr.openjdk.java.net/~tnakamura/8234386/webrev.00">http://cr.openjdk.java.net/~tnakamura/8234386/webrev.00</a><br>> > > > > ><br>> > > > > > Issue:<br>> > > > > > NullPointerException was thrown when Choice was expanded from<br>> > > > > maximized Frame.<br>> > > > > ><br>> > > > > > Fix:<br>> > > > > > Simply adding a null check to JPopupMenu. When the frame was<br>> > > > > maximized and expanding<br>> > > > > > Choice component, GraphicsConfiguration parameter can be null.<br>> > > > > Detailed description was in JBS.<br>> > > > > ><br>> > > > > > Thanks,<br>> > > > > > Toshio Nakamura<br>> > > > > ><br>> > > > ><br>> > > > ><br>> > > > > --<br>> > > > > Best regards, Sergey.<br>> > > > ><br>> > > ><br>> > ><br>> > ><br>> > > --<br>> > > Best regards, Sergey.<br>> > ><br>> > <br>> <br>> <br>> -- <br>> Best regards, Sergey.<br>> <br></font></tt><BR>
</body></html>