[8] Review request for 8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in java console once click drop-down check box. (original) (raw)
Artem Ananiev artem.ananiev at oracle.com
Tue Jun 11 07:14:32 PDT 2013
- Previous message: [8] Review request for 8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in java console once click drop-down check box.
- Next message: [8] Review request for CR 8012569 TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/11/2013 5:53 PM, Sergey Bylokhov wrote:
Hi, Leonid. Does it mean that we cannot use InvokeAndW/Later on the toolkit thread?
In a few words: yes, you can't. Either use InvocationEvent as in this fix, or use SunToolkit.postEvent(AppContext, AWTEvent) for events received from the underlying platform.
Thanks,
Artem
On 11.06.2013 12:48, Leonid Romanov wrote:
Hi, Please review a fix for 8014264: The applet pathguyTimeDead throws java.lang.NullPointerException in java console once click drop-down check box. The problem here is that for applets prePostEvent is called within ThreadGroup that, by design, has no AppContext associated with it. So, when the code in XChoicePeer/XListPeer prePostEvent implementation calls EventQueue.invokeLater, it results in NPE because there is no EQ for this ThreadGroup. The fix is not to use invokeLater, but to manually create InvocationEvent to ensure that target's AppContext would be used to find an EQ for the event to go into.
Bug: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=8014264 Webrev: http://cr.openjdk.java.net/~leonidr/8014264/webrev.00/ <http://cr.openjdk.java.net/%7Eleonidr/8014264/webrev.00/> Thanks, Leonid.
- Previous message: [8] Review request for 8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in java console once click drop-down check box.
- Next message: [8] Review request for CR 8012569 TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]