<AWT Dev> [OpenJDK 2D-Dev] Review Request for 6879044
Mandy.Chung at Sun.COM
Wed Sep 23 09:15:12 PDT 2009
Anthony Petrov wrote:
> On 09/23/2009 03:41 PM, Alan Bateman wrote:
>>> If AWT initialized the loggers lazily, and only did it when the
>>> logging is actually enabled (checking for some system property, or
>>> whatever other way), would we still be statically linked to the
>>> j.u.logging package in case of a regular client application that does
>>> not use/enable logging explicitly?
>> Yes, minimally they should be created lazily (this is one of the
>> suggestions that Mandy listed in 6880089). That would at least avoid
>> initializing all these loggers. The static dependency remains.
> Ah, I just looked over the PlatformLogger code, and now I see it uses
> reflection to access the j.u.logging.* classes. Now this point is clear.
> Have it been discussed whether that is feasible to modify the VM in
> order to eliminate the static dependency if a particular object never
> gets initialized?
The HotSpot VM does lazy resolution and it doesn't load the type of an
object if it's not initialized.
Static dependency refers to the types referenced in a class file (i.e.
any types directly referenced in the source).
> It just looks kind of artificial to create such proxy classes. I bet
> we'll need plenty of them for other modules. Won't the code be messed up
> too much?
> best regards,
More information about the awt-dev