Commit 89dc17b7 authored by GregDThomas's avatar GregDThomas Committed by Guus der Kinderen

Update LocalMUCRoom.java

Preserve the null modification date when serialising/deserialising
parent d6dea38b
......@@ -2723,12 +2723,10 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
ExternalizableUtil.getInstance().writeSafeUTF(out, subject);
ExternalizableUtil.getInstance().writeLong(out, roomID);
ExternalizableUtil.getInstance().writeLong(out, creationDate.getTime());
if (modificationDate!=null) {
ExternalizableUtil.getInstance().writeBoolean(out, modificationDate != null);
if (modificationDate != null) {
ExternalizableUtil.getInstance().writeLong(out, modificationDate.getTime());
}
else {
ExternalizableUtil.getInstance().writeLong(out, creationDate.getTime());
}
ExternalizableUtil.getInstance().writeBoolean(out, emptyDate != null);
if (emptyDate != null) {
ExternalizableUtil.getInstance().writeLong(out, emptyDate.getTime());
......@@ -2765,7 +2763,9 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
subject = ExternalizableUtil.getInstance().readSafeUTF(in);
roomID = ExternalizableUtil.getInstance().readLong(in);
creationDate = new Date(ExternalizableUtil.getInstance().readLong(in));
if (ExternalizableUtil.getInstance().readBoolean(in)) {
modificationDate = new Date(ExternalizableUtil.getInstance().readLong(in));
}
if (ExternalizableUtil.getInstance().readBoolean(in)) {
emptyDate = new Date(ExternalizableUtil.getInstance().readLong(in));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment