summaryrefslogtreecommitdiff
path: root/sources/events/internal/VSProtocolEvent.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/events/internal/VSProtocolEvent.java
parentf7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff)
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/events/internal/VSProtocolEvent.java')
-rw-r--r--sources/events/internal/VSProtocolEvent.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/sources/events/internal/VSProtocolEvent.java b/sources/events/internal/VSProtocolEvent.java
index 5f5ceb4..8d6b2dd 100644
--- a/sources/events/internal/VSProtocolEvent.java
+++ b/sources/events/internal/VSProtocolEvent.java
@@ -27,7 +27,7 @@ import java.io.*;
import events.*;
import protocols.VSAbstractProtocol;
-import serialize.*;
+import serialize.VSSerialize;
/**
* The class VSProtocolEvent. This event is used if a protocol (server or
@@ -144,9 +144,16 @@ public class VSProtocolEvent extends VSAbstractEvent {
ObjectOutputStream objectOutputStream)
throws IOException {
super.serialize(serialize, objectOutputStream);
+
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
+
objectOutputStream.writeObject(protocolClassname);
objectOutputStream.writeObject(new Boolean(isClientProtocol));
objectOutputStream.writeObject(new Boolean(isProtocolActivation));
+
+ /** For later backwards compatibility, to add more stuff */
+ objectOutputStream.writeObject(new Boolean(false));
}
/* (non-Javadoc)
@@ -162,10 +169,17 @@ public class VSProtocolEvent extends VSAbstractEvent {
if (VSSerialize.DEBUG)
System.out.println("Deserializing: VSProtocolEvent");
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
+
protocolClassname = (String) objectInputStream.readObject();
isClientProtocol = ((Boolean)
objectInputStream.readObject()).booleanValue();;
isProtocolActivation = ((Boolean)
objectInputStream.readObject()).booleanValue();;
+
+ /** For later backwards compatibility, to add more stuff */
+ objectInputStream.readObject();
+
}
}