From 4cbd454b243748dfc49284bd4cf0efa02b19c94e Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 19 Aug 2002 22:28:05 +0000 Subject: [PATCH] Added serialVersionUID to the various classes we serialize for configuration reasons to avoid annoying "recompile and nothing works" phenomenon. We'll opt for the "make incompatible class change and nothing works" scenario instead. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1650 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/cast/ActionSequence.java | 6 +++++- src/java/com/threerings/cast/CharacterComponent.java | 6 +++++- src/java/com/threerings/cast/ComponentClass.java | 6 +++++- src/java/com/threerings/media/tile/TrimmedTileSet.java | 6 +++++- .../com/threerings/media/tile/bundle/TileSetBundle.java | 6 +++++- src/java/com/threerings/miso/tile/FringeConfiguration.java | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/cast/ActionSequence.java b/src/java/com/threerings/cast/ActionSequence.java index 08393df4e..dae897a36 100644 --- a/src/java/com/threerings/cast/ActionSequence.java +++ b/src/java/com/threerings/cast/ActionSequence.java @@ -1,5 +1,5 @@ // -// $Id: ActionSequence.java,v 1.5 2002/07/24 22:24:05 mdb Exp $ +// $Id: ActionSequence.java,v 1.6 2002/08/19 22:28:05 mdb Exp $ package com.threerings.cast; @@ -47,4 +47,8 @@ public class ActionSequence implements Serializable ", origin=" + origin + ", orients=" + (orients == null ? 0 : orients.length) + "]"; } + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; } diff --git a/src/java/com/threerings/cast/CharacterComponent.java b/src/java/com/threerings/cast/CharacterComponent.java index 7fef886c0..6642ba073 100644 --- a/src/java/com/threerings/cast/CharacterComponent.java +++ b/src/java/com/threerings/cast/CharacterComponent.java @@ -1,5 +1,5 @@ // -// $Id: CharacterComponent.java,v 1.6 2002/05/04 19:38:13 mdb Exp $ +// $Id: CharacterComponent.java,v 1.7 2002/08/19 22:28:05 mdb Exp $ package com.threerings.cast; @@ -73,4 +73,8 @@ public class CharacterComponent implements Serializable /** The entity from which we obtain our animation frames. */ protected FrameProvider _frameProvider; + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; } diff --git a/src/java/com/threerings/cast/ComponentClass.java b/src/java/com/threerings/cast/ComponentClass.java index 89c2c1b9a..11f3ce777 100644 --- a/src/java/com/threerings/cast/ComponentClass.java +++ b/src/java/com/threerings/cast/ComponentClass.java @@ -1,5 +1,5 @@ // -// $Id: ComponentClass.java,v 1.2 2001/11/27 08:09:35 mdb Exp $ +// $Id: ComponentClass.java,v 1.3 2002/08/19 22:28:05 mdb Exp $ package com.threerings.cast; @@ -79,4 +79,8 @@ public class ComponentClass implements Serializable return (obj == this); } } + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; } diff --git a/src/java/com/threerings/media/tile/TrimmedTileSet.java b/src/java/com/threerings/media/tile/TrimmedTileSet.java index 649902afc..252d56130 100644 --- a/src/java/com/threerings/media/tile/TrimmedTileSet.java +++ b/src/java/com/threerings/media/tile/TrimmedTileSet.java @@ -1,5 +1,5 @@ // -// $Id: TrimmedTileSet.java,v 1.3 2002/06/21 18:44:27 mdb Exp $ +// $Id: TrimmedTileSet.java,v 1.4 2002/08/19 22:28:05 mdb Exp $ package com.threerings.media.tile; @@ -94,4 +94,8 @@ public class TrimmedTileSet extends TileSet * within the untrimmed image at which the trimmed image should be * rendered. */ protected Rectangle[] _tbounds; + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; } diff --git a/src/java/com/threerings/media/tile/bundle/TileSetBundle.java b/src/java/com/threerings/media/tile/bundle/TileSetBundle.java index d42a404f4..dca24a068 100644 --- a/src/java/com/threerings/media/tile/bundle/TileSetBundle.java +++ b/src/java/com/threerings/media/tile/bundle/TileSetBundle.java @@ -1,5 +1,5 @@ // -// $Id: TileSetBundle.java,v 1.7 2002/06/19 08:28:55 mdb Exp $ +// $Id: TileSetBundle.java,v 1.8 2002/08/19 22:28:05 mdb Exp $ package com.threerings.media.tile.bundle; @@ -120,4 +120,8 @@ public class TileSetBundle extends HashIntMap /** We use the image manager to decode our images. */ protected ImageManager _imgr; + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; } diff --git a/src/java/com/threerings/miso/tile/FringeConfiguration.java b/src/java/com/threerings/miso/tile/FringeConfiguration.java index 268ff7169..62e08c6a5 100644 --- a/src/java/com/threerings/miso/tile/FringeConfiguration.java +++ b/src/java/com/threerings/miso/tile/FringeConfiguration.java @@ -1,5 +1,5 @@ // -// $Id: FringeConfiguration.java,v 1.11 2002/05/07 00:05:02 mdb Exp $ +// $Id: FringeConfiguration.java,v 1.12 2002/08/19 22:28:05 mdb Exp $ package com.threerings.miso.tile; @@ -129,4 +129,8 @@ public class FringeConfiguration implements Serializable /** The mapping from base tileset id to fringerecord. */ protected HashIntMap _frecs = new HashIntMap(); + + /** Increase this value when object's serialized state is impacted by + * a class change (modification of fields, inheritance). */ + private long serialVersionUID = 1; }