summaryrefslogtreecommitdiff
path: root/sources/core/VSProcess.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/VSProcess.java
parentf7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff)
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/core/VSProcess.java')
-rw-r--r--sources/core/VSProcess.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/core/VSProcess.java b/sources/core/VSProcess.java
index c6456de..9842321 100644
--- a/sources/core/VSProcess.java
+++ b/sources/core/VSProcess.java
@@ -1024,12 +1024,18 @@ public class VSProcess extends VSPrefs implements VSSerializable {
System.out.println("Serializing: VSProcess (num: " + processNum
+ "; id: " + processID + ")");
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
+
objectOutputStream.writeObject(new Integer(processID));
objectOutputStream.writeObject(new Integer(protocolsToReset.size()));
for (VSAbstractProtocol protocol : protocolsToReset) {
objectOutputStream.writeObject(protocol.getClassname());
protocol.serialize(serialize, objectOutputStream);
}
+
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
}
/* (non-Javadoc)
@@ -1046,6 +1052,9 @@ public class VSProcess extends VSPrefs implements VSSerializable {
if (VSSerialize.DEBUG)
System.out.println("Deserializing: VSProcess");
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
+
this.processID = ((Integer)
objectInputStream.readObject()).intValue();
int numProtocols = ((Integer)
@@ -1057,6 +1066,9 @@ public class VSProcess extends VSPrefs implements VSSerializable {
protocol.deserialize(serialize, objectInputStream);
}
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
+
serialize.setObject(processNum, "process", this);
}
}