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/VSProcess.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sources/core/VSProcess.java') 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); } } -- cgit v1.2.3