From 11af1c9fa7fe66e10de0a92878311b4e22befb0f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 3 Jun 2008 16:41:37 +0000 Subject: made future serialized class versions backwards compatible. --- sources/simulator/VSSimulator.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sources/simulator/VSSimulator.java') 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(); } -- cgit v1.2.3