diff options
| author | Paul Buetow <paul@buetow.org> | 2008-06-03 16:41:37 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-06-03 16:41:37 +0000 |
| commit | 11af1c9fa7fe66e10de0a92878311b4e22befb0f (patch) | |
| tree | 8dfc7af2ec18eb5889327426bc6fdb7379a3feba /sources/simulator/VSSimulator.java | |
| parent | f7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff) | |
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/simulator/VSSimulator.java')
| -rw-r--r-- | sources/simulator/VSSimulator.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/simulator/VSSimulator.java b/sources/simulator/VSSimulator.java index aec330e..0a7c6c2 100644 --- a/sources/simulator/VSSimulator.java +++ b/sources/simulator/VSSimulator.java @@ -1232,7 +1232,14 @@ public class VSSimulator extends JPanel implements VSSerializable { public synchronized void serialize(VSSerialize serialize, ObjectOutputStream objectOutputStream) throws IOException { + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + simulatorCanvas.serialize(serialize, objectOutputStream); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + } /* (non-Javadoc) @@ -1248,8 +1255,15 @@ public class VSSimulator extends JPanel implements VSSerializable { serialize.setObject("simulator", this); serialize.setObject("logging", logging); + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + simulatorCanvas.deserialize(serialize, objectInputStream); + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + updateFromPrefs(); updateTaskManagerTable(); } |
