summaryrefslogtreecommitdiff
path: root/sources/core/VSTask.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-03 16:41:37 +0000
committerPaul Buetow <paul@buetow.org>2008-06-03 16:41:37 +0000
commit11af1c9fa7fe66e10de0a92878311b4e22befb0f (patch)
tree8dfc7af2ec18eb5889327426bc6fdb7379a3feba /sources/core/VSTask.java
parentf7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff)
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/core/VSTask.java')
-rw-r--r--sources/core/VSTask.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index 1b8f744..c1323e8 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -362,6 +362,9 @@ public class VSTask implements Comparable, VSSerializable {
public synchronized void serialize(VSSerialize serialize,
ObjectOutputStream objectOutputStream)
throws IOException {
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
+
objectOutputStream.writeObject(new Integer(process.getProcessNum()));
objectOutputStream.writeObject(event.getClassname());
objectOutputStream.writeObject(new Integer(event.getID()));
@@ -370,6 +373,9 @@ public class VSTask implements Comparable, VSSerializable {
objectOutputStream.writeObject(new Long(taskTime));
objectOutputStream.writeObject(new Boolean(isGlobalTimed));
objectOutputStream.writeObject(new Boolean(isProgrammed));
+
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
}
/* (non-Javadoc)
@@ -383,6 +389,9 @@ public class VSTask implements Comparable, VSSerializable {
if (VSSerialize.DEBUG)
System.out.println("Deserializing: VSTask");
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
+
int processNum = ((Integer) objectInputStream.readObject()).intValue();
VSProcess process = (VSProcess)
serialize.getObject(processNum, "process");
@@ -412,6 +421,9 @@ public class VSTask implements Comparable, VSSerializable {
serialize.setObject(taskNum, "task", this);
init(taskTime, process, event, !isGlobalTimed.booleanValue());
this.isProgrammed = isProgrammed.booleanValue();
+
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
}
}