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/core/VSTaskManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sources/core/VSTaskManager.java') diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java index 272a52c..d4ee83c 100644 --- a/sources/core/VSTaskManager.java +++ b/sources/core/VSTaskManager.java @@ -503,6 +503,8 @@ public class VSTaskManager 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)); ArrayList tasks = new ArrayList(); @@ -526,6 +528,9 @@ public class VSTaskManager implements VSSerializable { objectOutputStream.writeObject(new Integer(tasks.size())); for (VSTask task : tasks) task.serialize(serialize, objectOutputStream); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); } /* (non-Javadoc) @@ -539,6 +544,9 @@ public class VSTaskManager implements VSSerializable { if (VSSerialize.DEBUG) System.out.println("Deserializing: VSTaskManager"); + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + globalTasks.clear(); ArrayList processes = simulatorCanvas.getProcesses(); @@ -552,5 +560,8 @@ public class VSTaskManager implements VSSerializable { VSTask task = new VSTask(serialize, objectInputStream); addTask(task, task.isProgrammed()); } + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); } } -- cgit v1.2.3