commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <GGreg...@seagullsoftware.com>
Subject RE: VFS release
Date Fri, 03 Dec 2010 17:00:47 GMT
> -----Original Message-----
> From: Jörg Schaible [mailto:joerg.schaible@gmx.de]
> Sent: Thursday, December 02, 2010 14:11
> To: dev@commons.apache.org
> Subject: RE: VFS release
> 
> Gary Gregory wrote:
> 
> > How about warnings like:
> >
> > Description	Resource	Path	Location	Type
> > The serializable class FileNotFolderException does not declare a static
> > final serialVersionUID field of type long
> FileNotFolderException.java
> > /commons-vfs2/src/main/java/org/apache/commons/vfs2	line 24	Java
> Problem
> >
> > ?
> 
> The serialVersionUID is part of the binary compatibility therefore it should
> be set to be sure. Setting it implies though that you update it every time
> you change the binary layout of the class (ot take further actions to keep
> serialization compatibility). Without using an explicit value, the
> serialVeeionUID is computed on its own and you might not even notice the
> problem (in former times different compilers created sometimes different
> UIDs). In our code we set it normally to the date of last modification if
> the binary layout e.g. 20101102L.

I usually add serialVersionUID = -1 but I do like your convention. So I added serialVersionUID
= 20101208L

Gary

> 
> - Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org

Mime
View raw message