From d6a2b54372b1259cf8801c4bb80fb98a65263331 Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 19 Dec 2002 22:41:13 +0000 Subject: [PATCH] Oh the serialization + DashO humanity. We have to override the serialVersionUID because requesting for DashO to include a class as is with no modifications still results in a different serialVersionUID than the automatically generated value (even though the documentation indicates otherwise). Keerist, what a fragile fiasco. git-svn-id: https://samskivert.googlecode.com/svn/trunk@999 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/ArrayIntSet.java | 8 +++++++- .../src/java/com/samskivert/util/SortableArrayList.java | 8 +++++++- .../samskivert/src/java/com/samskivert/util/Tuple.java | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java index e4a4bc03..3f1be8ea 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java +++ b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java @@ -1,5 +1,5 @@ // -// $Id: ArrayIntSet.java,v 1.9 2002/12/16 01:57:36 mdb Exp $ +// $Id: ArrayIntSet.java,v 1.10 2002/12/19 22:41:13 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -360,4 +360,10 @@ public class ArrayIntSet extends AbstractSet /** The number of elements in this set. */ protected int _size; + + /** Change this if the fields or inheritance hierarchy ever changes + * (which is extremely unlikely). We override this because I'm tired + * of serialized crap not working depending on whether I compiled with + * jikes or javac. */ + private static final long serialVersionUID = 1; } diff --git a/projects/samskivert/src/java/com/samskivert/util/SortableArrayList.java b/projects/samskivert/src/java/com/samskivert/util/SortableArrayList.java index a2d3e4be..14292629 100644 --- a/projects/samskivert/src/java/com/samskivert/util/SortableArrayList.java +++ b/projects/samskivert/src/java/com/samskivert/util/SortableArrayList.java @@ -1,5 +1,5 @@ // -// $Id: SortableArrayList.java,v 1.8 2002/12/16 01:55:55 mdb Exp $ +// $Id: SortableArrayList.java,v 1.9 2002/12/19 22:41:13 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -246,4 +246,10 @@ public class SortableArrayList extends AbstractList /** The number of elements in our list. */ protected int _size; + + /** Change this if the fields or inheritance hierarchy ever changes + * (which is extremely unlikely). We override this because I'm tired + * of serialized crap not working depending on whether I compiled with + * jikes or javac. */ + private static final long serialVersionUID = 1; } diff --git a/projects/samskivert/src/java/com/samskivert/util/Tuple.java b/projects/samskivert/src/java/com/samskivert/util/Tuple.java index c5fdfcea..47a587cb 100644 --- a/projects/samskivert/src/java/com/samskivert/util/Tuple.java +++ b/projects/samskivert/src/java/com/samskivert/util/Tuple.java @@ -1,5 +1,5 @@ // -// $Id: Tuple.java,v 1.4 2001/11/26 21:57:42 mdb Exp $ +// $Id: Tuple.java,v 1.5 2002/12/19 22:41:13 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -77,4 +77,10 @@ public class Tuple implements Serializable { return "[left=" + left + ", right=" + right + "]"; } + + /** Change this if the fields or inheritance hierarchy ever changes + * (which is extremely unlikely). We override this because I'm tired + * of serialized crap not working depending on whether I compiled with + * jikes or javac. */ + private static final long serialVersionUID = 1; }