🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14634

Member classes and serialVersionUID

#14634
From: ragaller
Date: Mon, 09 Aug 1999 00:00
38 lines
1477 bytes
I use the following construct:

public class Outer
        implements java.io.Serializable
{
    static final long serialVersionUID = -
982764827346875L;

    public class Inner
        implements java.io.Serializable
    {
        static final long serialVersionUID = -
2345235234524545L;
    }

}


The Borland compiler (JBuilder3) will complain,
Sun's compiler from
JDK1.2 won't. Sun's compiler complains only on
non final statics.

Who's wrong?

If Sun's compiler is bogous, how can I apply the
serialVersionUID mechanism to member classes?
Or is this not necessary, since member class
instances never appear without an outer class
instance, and the serialization mechanism uses
the serialVersionUID of the toplevel class if
available?

Thanks Georg


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID: <7omkk2$cp6$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,36d02741711e957f,start
X-Google-Attributes: gidf74b3,public
From: ragaller@my-deja.com
Subject: Member classes and serialVersionUID
Date: 1999/08/09
Message-ID: <7omkk2$cp6$1@nnrp1.deja.com>
X-Deja-AN: 510575558
X-Http-Proxy: 1.1 x31.deja.com:80 (Squid/1.1.22) for client 195.27.48.68
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Mon Aug 09 13:10:33 1999 GMT
Newsgroups: borland.public.jbuilder.java.language
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)