Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 53411 invoked from network); 22 May 2009 19:28:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 19:28:28 -0000 Received: (qmail 93135 invoked by uid 500); 22 May 2009 19:28:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 92991 invoked by uid 500); 22 May 2009 19:28:39 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 92969 invoked by uid 99); 22 May 2009 19:28:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 19:28:35 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-commons-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 19:28:26 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M7aPR-0002lW-Tp for dev@commons.apache.org; Fri, 22 May 2009 19:28:02 +0000 Received: from hsi-kbw-078-042-173-083.hsi3.kabel-badenwuerttemberg.de ([78.42.173.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 May 2009 19:28:01 +0000 Received: from joerg.schaible by hsi-kbw-078-042-173-083.hsi3.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 May 2009 19:28:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: dev@commons.apache.org To: dev@commons.apache.org From: =?ISO-8859-1?Q?J=F6rg?= Schaible Subject: Re: [MATH] Moving Serializable from interfaces to implementations Date: Fri, 22 May 2009 21:27:48 +0200 Lines: 31 Message-ID: References: <25aac9fc0905220617s6779528cmb3b1199c8e79c281@mail.gmail.com> <834716.86596.qm@web63303.mail.re1.yahoo.com> Reply-To: joerg.schaible@gmx.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hsi-kbw-078-042-173-083.hsi3.kabel-badenwuerttemberg.de Mail-Copies-To: never User-Agent: KNode/0.10.9 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org John Bollinger wrote: > > > sebb wrote: >> Below is a sample of how we might proceed with the removal of >> Serializable from implementations. >> >> Feedback please! > > [...] > >> /** Serializable version identifier. */ >> private static final long serialVersionUID = -2036131698031167221L; > > I strongly recommend using small integers (i.e. 1 for this version) for > the serialVersionUID values. These are more meaningful and easier to > maintain. Such values also make it clear(er) to maintainers that they > must think about the value, as opposed to always updating it to match the > value that would be auto-generated by Java. (Classes can be changed in > ways that do not alter their serialized representation, but do change the > automatic SUID.) The only advantage to manually declaring the automatic > SUID value is for serialization compatibility with previous versions of > the class, but I'm not sure that's a relevant concern in this case. This is why I actually use normally a value reflecting the last change of the binary layout, e.g. private static final long serialVersionUID = 20090522L; - J�rg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org