WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [8] Request for review: 7080109 Dialog.show() lacks doPrivileged() to access system event queue

Re: <AWT Dev> [8] Request for review: 7080109 Dialog.show() lacks doPrivileged() to access system event queue

by Sergey Bylokhov-3 :: Rate this Message:

| View in Thread

Hi, Artem.
Thanks for view.
Scope was changed. Here is an updated version:
http://cr.openjdk.java.net/~serb/7080109/webrev.01/

05.04.2012 14:46, Artem Ananiev wrote:

> Hi, Sergey,
>
> to limit the scope of the added doPrivileged() block, I would rewrite
> the code this way:
>
>     secondaryLoop = AccessController.doPrivileged(
>         new PrivilegedAction<SecondaryLoop>() {
>             public SecondaryLoop run() {
>                 EventQueue eventQueue =
>                     Toolkit.getDefaultToolkit().getSystemEventQueue();
>                 return eventQueue.createSecondaryLoop(
>                     cond, modalFilter, 0);
>             }
>         }
>     );
>     if (!secondaryLoop.enter()) {
>         secondaryLoop = null;
>     }
>
> Thanks,
>
> Artem
>
> On 3/30/2012 8:22 PM, Sergey Bylokhov wrote:
>> Hi Everyone,
>> In the fix doPrivileged was added to Dialog.show().
>>
>> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7080109
>> Webrev can be found at:
>> http://cr.openjdk.java.net/~serb/7080109/webrev.00/
>>


--
Best regards, Sergey.

 « Return to Thread: [8] Request for review: 7080109 Dialog.show() lacks doPrivileged() to access system event queue