[Ginp-developers] Serializabe classes?
Brought to you by:
burchbri,
dougculnane
From: Brian B. <br...@Pi...> - 2007-02-05 13:18:50
|
I'm still plodding through my CheckStyle code cleanup. So far, I've not done anything about several classes that are missing javadoc's for fields. Before I added a comment, I wanted it to be meaningful. Here's an example from net.sf.ginp.tags.PageNavigator ... private static final long serialVersionUID = -6994731253601826937L; I didn't know what this was for and did some digging. Apparently it is a technique for making a class Serializable in a way that supports "compatible" code changes that would not be possible if the class were to simply implement the java.io.Serializable interface. It becomes the programmer's responsibility to decide when a change is not backward compatible and generate a new long value. Well, I still don't get it. Why does net.sf.ginp.tags.PageNavigator need to be Serialized at all? Can I simply delete the fields from this type of class, or is there some subtle gotcha associated with one of the frameworks we are using? I don't think so, but will wait to hear your opinion because it isn't worth the risk of breaking a working version. Regards, Brian |