>>>>> andrey writes:
andrey> Hi, All!
andrey> I just noticed a little problem: When I tried to serialize
andrey> class with "private static int xxx" IBM's jdk hung
andrey> (Blackdown's didn't :) )
andrey> It works fine if I make it "private transient static int
andrey> xxx".
andrey> My question is: What java SUPPOSED to do with class like
andrey> this. I haven't seen it in documentation but I guess it
andrey> should just ignore static fields. Do I have to make
andrey> static fields ALWAYS explicitly TRANSIENT?
No, the default behavior is to not serialize static fields, see
section 1.5 in the Serialization specification:
Default serializable fields of a class are defined to be the
non-transient and non-static fields.
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Porting Team
http://www.blackdown.org/java-linux.html
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]