<AWT Dev> hg: jdk8/awt/jdk: 6995769: occasion NPE thrown from SwingUtilities.computeIntersection()

Roman Kennke roman at kennke.org
Thu Jul 28 12:17:57 PDT 2011


Hi Artem,

> On 7/28/2011 10:34 PM, Roman Kennke wrote:
> > Find attached a testcase. Upon running, this will bring up a small frame
> > and a JOptionPane. None of them renders for me, but after some blind
> > clicking in the option pane it throws exactly this NPE.
> 
> Showing a modal dialog from paint() is very artificial, isn't it? :) 
> Given how complex Swing painting code is, I doubt we'll be able to 
> reliably support scenarios like this. But in general, I agree, the 
> current Pavel's fix doesn't look robust and actually hide the real 
> problem, making it even harder to debug.


I will tell this (artificial problem) to my team! They are running into
this every couple of weeks with a real world application in a critical
application. Yes, it's application's fault. But doing this better than
swallownig the NPE would help alot.

Cheers, Roman

> Thanks,
> 
> Artem
> 
> > Regards, Roman
> >
> >
> > Am Donnerstag, den 28.07.2011, 20:22 +0200 schrieb Mario Torre:
> >> 2011/7/28 Artem Ananiev<artem.ananiev at oracle.com>:
> >>>
> >>> +1
> >>
> >> Yeah, I agree with Roman, IllegalStateException sounds like the
> >> perfect option to me.
> >>
> >> Cheers,
> >> Mario
> >
> 





More information about the awt-dev mailing list