Hi Sergey,

Thank you for the review.
How about the fix in webrev.01?

To calculate Insets of default screen could be same as to set gc of default
screen device, I think.
I found similar code in RepaintManager.

http://cr.openjdk.java.net/~tnakamura/8234386/webrev.01

Thanks,
Toshio Nakamura

Sergey Bylokhov <[email protected]> wrote on 2019/11/21 17:42:39:

> From: Sergey Bylokhov <[email protected]>
> To: Toshio 5 Nakamura <[email protected]>, [email protected]
> Date: 2019/11/21 17:42
> Subject: [EXTERNAL] Re: <Swing Dev> RFR: JDK-8234386: [macos] NPE
> was thrown at expanding Choice from maximized frame
>
> Hi, Toshio.
>
> In a few lines above your fix, the code takes care of null GC and use the
main
> screen size as a screen bound, so I think your change should calculate
> Insets for the main screen as well instead of using zeros.
>
> BTW probably GraphicsEnvironment.getMaximumWindowBounds() could be used
at
> line 336 additionally to your fix.
>
> On 11/19/19 7:55 pm, Toshio 5 Nakamura wrote:
> > Hi All,
> >
> > Could you review the following fix? Also, I'd like to ask a
> sponsor of this fix, since I'm not a committer.
> >
> > Bug:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8234386&d=DwIC-g&c=jf_iaSHvJObTbx-siA1ZOg&r=EVbFABcgo-X99_TGI2-qsMtyulHUruf8lAzMlVpVRqw&m=vIFgkRdfHvXKJfna-pUC4AfFb5zir99b_akQXiMe7SQ&s=xxFH1dSBnrwQapEECPRwKZ1dQzq1iyg9bfRhugbEIsQ&e=

> > Webrev:
https://urldefense.proofpoint.com/v2/url?u=http-3A__cr.openjdk.java.net_-7Etnakamura_8234386_webrev.00&d=DwIC-g&c=jf_iaSHvJObTbx-siA1ZOg&r=EVbFABcgo-X99_TGI2-qsMtyulHUruf8lAzMlVpVRqw&m=vIFgkRdfHvXKJfna-pUC4AfFb5zir99b_akQXiMe7SQ&s=TV9DucTTC2SKvQGxs7LWbBrj0nnqzFrgP5QaRmH5voI&e=

> >
> > Issue:
> > NullPointerException was thrown when Choice was expanded from
> maximized Frame.
> >
> > Fix:
> > Simply adding a null check to JPopupMenu. When the frame was
> maximized and expanding
> > Choice component, GraphicsConfiguration parameter can be null.
> Detailed description was in JBS.
> >
> > Thanks,
> > Toshio Nakamura
> >
>
>
> --
> Best regards, Sergey.
>

Reply via email to