Commit d6dea38b authored by David B Harrison's avatar David B Harrison Committed by Guus der Kinderen

Upon External Serialization, do a nulll check on modificationDate. It is...

Upon External Serialization, do a nulll check on modificationDate. It is possible that the modificationDate is null, if the room was just created through REST API. That results in an NPE,
partial room creation, and failure in communicating the room updated event via hazelcast.

If modification date is null, send the creationDate value instead.
see https://discourse.igniterealtime.org/t/openfire-hazelcast-clustering-rest-api-room-creation-npe-when-no-modificaitondate-sent/80619/2
parent d727b51c
......@@ -2723,7 +2723,12 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
ExternalizableUtil.getInstance().writeSafeUTF(out, subject);
ExternalizableUtil.getInstance().writeLong(out, roomID);
ExternalizableUtil.getInstance().writeLong(out, creationDate.getTime());
ExternalizableUtil.getInstance().writeLong(out, modificationDate.getTime());
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());
......
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