<Swing Dev> RFR: JDK-8234386: [macos] NPE was thrown at expanding Choice from maximized frame
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Sat Nov 23 20:19:36 UTC 2019
One small question about the test, is it necessary to check macOS only?
I assume the code will work on any platform?
On 11/21/19 5:06 pm, Toshio 5 Nakamura wrote:
> Hi Sergey,
>
> Thank you for the comment.
> Please find webrev.02.
> http://cr.openjdk.java.net/~tnakamura/8234386/webrev.02
>
> Thanks,
> Toshio Nakamura
>
> Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote on 2019/11/22 07:07:03:
>
> > From: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
> > To: Toshio 5 Nakamura <TOSHIONA at jp.ibm.com>
> > Cc: swing-dev at openjdk.java.net
> > Date: 2019/11/22 07:07
> > Subject: [EXTERNAL] Re: <Swing Dev> RFR: JDK-8234386: [macos] NPE
> > was thrown at expanding Choice from maximized frame
> >
> > It looks like after the .01 version you can inline the usage of
> > Toolkit.getDefaultToolkit(), it is only used inside
> > "if (!canPopupOverlapTaskBar()) {".
> >
> > On 11/21/19 5:10 am, Toshio 5 Nakamura wrote:
> > > 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 <Sergey.Bylokhov at oracle.com> wrote on 2019/11/21 17:42:39:
> > >
> > > > From: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
> > > > To: Toshio 5 Nakamura <TOSHIONA at jp.ibm.com>, swing-dev at openjdk.java.net
> > > > 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() couldbe 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://bugs.openjdk.java.net/browse/JDK-8234386
> > > > > Webrev: http://cr.openjdk.java.net/~tnakamura/8234386/webrev.00
> > > > >
> > > > > 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.
> > > >
> > >
> >
> >
> > --
> > Best regards, Sergey.
> >
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list