From 63c967d8d242d7a242b3d9b1bbec21a521136258 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 2 Apr 2011 04:02:12 +0000 Subject: [PATCH] We can't allow the primary ctor to be called for EntryUpdated/RemovedEvent because that will overwrite the hackery we do with _oldEntry. Oh hackery, how we love you so. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6586 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/dobj/EntryRemovedEvent.java | 9 ++++++++- .../com/threerings/presents/dobj/EntryUpdatedEvent.java | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/threerings/presents/dobj/EntryRemovedEvent.java b/src/main/java/com/threerings/presents/dobj/EntryRemovedEvent.java index 261d8588c..11acf9519 100644 --- a/src/main/java/com/threerings/presents/dobj/EntryRemovedEvent.java +++ b/src/main/java/com/threerings/presents/dobj/EntryRemovedEvent.java @@ -48,7 +48,14 @@ public class EntryRemovedEvent extends EntryEvent { super(targetOid, name); _key = key; - _oldEntry = oldEntry; + } + + /** For unserialization. */ + public EntryRemovedEvent () + { + super(0, null); + // we can't allow our primary ctor to be called during unserialization, or it will wipe out + // the hackery we do with _oldEntry } @Override diff --git a/src/main/java/com/threerings/presents/dobj/EntryUpdatedEvent.java b/src/main/java/com/threerings/presents/dobj/EntryUpdatedEvent.java index a92c49aad..7c2da4493 100644 --- a/src/main/java/com/threerings/presents/dobj/EntryUpdatedEvent.java +++ b/src/main/java/com/threerings/presents/dobj/EntryUpdatedEvent.java @@ -52,6 +52,14 @@ public class EntryUpdatedEvent extends EntryEvent _oldEntry = oldEntry; } + /** For unserialization. */ + public EntryUpdatedEvent () + { + super(0, null); + // we can't allow our primary ctor to be called during unserialization, or it will wipe out + // the hackery we do with _oldEntry + } + @Override public Comparable getKey () {