i suppose its possible that they're not used in the cdk.  I mean to say that it is possible that cdk implementors of serializable are not actually serialised/ deserialised in the cdk api.  However, someone else in his own program could implement a system that uses rmi or ejb or an object database or an objectoutputstream or other I/O to transport or store some cdk data objects.
As best practise, anything that implements Serializable should have a serialversionuid as you cant know what someone will do with your code and it's also possible that they use it for something you didn't think of when you wrote it :)

cheers

paul





========================================
Message Received: Jan 25 2009, 07:20 PM
From: "gilleain torrance"
To: "Developers forum for discussion about the Chemistry Development Kit
(CDK)"
Cc:
Subject: [Cdk-devel] serialVersionUIDs


hi,

I was curious about the serialVersionUIDs in the cdk, so I did this:

.find . -name "*.java" | xargs -L 1 grep "serialVersionUID" | uniq
-c | sort -n | tail

because I love ridiculously long unix pipes. But also to see if any of
the UIDs were repeated. Turns out that they are:

2 private static final long serialVersionUID = 2292654937621883661L;
2 private static final long serialVersionUID = 3328313175614956150L;

which are easy to find, as :

./org/openscience/cdk/isomorphism/matchers/OrderQueryBond.java:
private static final long serialVersionUID = 2292654937621883661L;
./org/openscience/cdk/isomorphism/matchers/OrderQueryBondOrderOnly.java:
private static final long serialVersionUID = 2292654937621883661L;

and

./org/openscience/cdk/isomorphism/matchers/SymbolAndChargeQueryAtom.java:
private static final long serialVersionUID = 3328313175614956150L;
./org/openscience/cdk/isomorphism/matchers/SymbolChargeIDQueryAtom.java:
private static final long serialVersionUID = 3328313175614956150L;

I don't know much about UIDs, but are they meant to be a) consistent
across 'versions', or b) unique for each class? Or perhaps they don't
matter...

Anyway, this leads me to the question : are the serializable
properties of the cdk used anywhere?

gilleain

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cdk-devel mailing list
Cdk-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-devel