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/core/VSTaskManager.java | |
| parent | f7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff) | |
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/core/VSTaskManager.java')
| -rw-r--r-- | sources/core/VSTaskManager.java | 11 |
1 files changed, 11 insertions, 0 deletions
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<VSTask> tasks = new ArrayList<VSTask>(); @@ -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<VSProcess> 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(); } } |
