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<[email protected]>: > >>> > >>> +1 > >> > >> Yeah, I agree with Roman, IllegalStateException sounds like the > >> perfect option to me. > >> > >> Cheers, > >> Mario > > >
