Review request for 6895456: Eliminate dependency on java.io.ObjectStreamClass during boot
Alan Bateman
Alan.Bateman at Sun.COM
Tue Oct 27 08:37:01 UTC 2009
Mandy Chung wrote:
> Fixed 6895456: Eliminate dependency on java.io.ObjectStreamClass
> during boot
>
> Webrev at:
> http://cr.openjdk.java.net/~mchung/6895456/webrev.00/
>
> java.io.ObjectStreamClass is not needed if not doing serialization.
> Move getSignatureClass static method to java.io.ObjectStreamField
> class. ObjectStreamField is always loaded due to the declaration of
> serialPersistentFields in a few core classes as they have evolved in
> the previous releases.
I agree it would be good to avoid loading/initializing ObjectStreamClass
(as you say, we have to load ObjectStreamField as the
serialPersistentFields is part of Class, String, and other APIs). My
only concern is that ObjectStreamField doesn't seem to be the right
place for this (as it's concerned with serializable fields) and it's a
bit strange for ObjectStreamClass to call into ObjectStreamField to get
a class signature. Have you considered alternatives, say duplicating
this method, or maybe a ClassSignature class?
-Alan.
More information about the core-libs-dev
mailing list