<AWT Dev> numAppContexts in AppContext modified in not-thread-safe way.

Clemens Eisserer linuxhippy at gmail.com
Fri Aug 19 01:40:43 PDT 2011


Found a mistake, corrected version at:
It ended up with numAppContexts=2 when class-initialization was done,
although there was only one context.

It's not clear to me why this case needs to be handled specially. I also
> can't tell what code would be calling getAppContext under those conditions.
>From what I understand its a fast-path. For normal Swing Applications, no
AppContexts are ever created (except the "system" context when
AppContext.class is loaded -> numAppContexts=1), so the code avoids the
look-up. I may have misunderstood it of course ;)

Thanks, Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20110819/b026a4a2/attachment.html 

More information about the awt-dev mailing list