commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject RE: VFS release
Date Thu, 02 Dec 2010 19:11:25 GMT
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.

- 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