From 44cc564be1a8ef5ebb8aecebe8c6f6acf539fb80 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Tue, 24 Mar 2020 17:29:16 +0100 Subject: [PATCH] Adjusted serial version UIDs and Message#toString() --- src/main/java/envoy/data/Message.java | 6 ++++-- src/main/java/envoy/data/User.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/envoy/data/Message.java b/src/main/java/envoy/data/Message.java index 7a8adc4..ab26c9a 100644 --- a/src/main/java/envoy/data/Message.java +++ b/src/main/java/envoy/data/Message.java @@ -57,7 +57,7 @@ public class Message implements Serializable { private Date receivedDate, readDate; private MessageStatus status; - private static final long serialVersionUID = -4393477412979594435L; + private static final long serialVersionUID = 0L; /** * Initializes a {@link Message} with values for all of its properties. The use @@ -107,13 +107,15 @@ public class Message implements Serializable { @Override public String toString() { - return String.format("TextMessage[id=%d,sender=%s,recipient=%s,date=%s,status=%s,text=%s,hasAttachment=%b]", + return String.format( + "TextMessage[id=%d,sender=%s,recipient=%s,date=%s,status=%s,text=%s,forwarded,hasAttachment=%b]", id, senderId, recipientId, new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(creationDate), status, text, + forwarded, attachment != null); } diff --git a/src/main/java/envoy/data/User.java b/src/main/java/envoy/data/User.java index 25be9e8..bf20fdf 100644 --- a/src/main/java/envoy/data/User.java +++ b/src/main/java/envoy/data/User.java @@ -49,7 +49,7 @@ public class User implements Serializable { private UserStatus status; - private static final long serialVersionUID = 3530947374856708236L; + private static final long serialVersionUID = 0L; /** * Initializes a {@link User}. The {@link UserStatus} is set to