Adjusted serial version UIDs and Message#toString()

This commit is contained in:
Kai S. K. Engelbart 2020-03-24 17:29:16 +01:00
parent 3d7199f146
commit 44cc564be1
2 changed files with 5 additions and 3 deletions

View File

@ -57,7 +57,7 @@ public class Message implements Serializable {
private Date receivedDate, readDate; private Date receivedDate, readDate;
private MessageStatus status; 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 * Initializes a {@link Message} with values for all of its properties. The use
@ -107,13 +107,15 @@ public class Message implements Serializable {
@Override @Override
public String toString() { 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, id,
senderId, senderId,
recipientId, recipientId,
new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(creationDate), new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(creationDate),
status, status,
text, text,
forwarded,
attachment != null); attachment != null);
} }

View File

@ -49,7 +49,7 @@ public class User implements Serializable {
private UserStatus status; 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 * Initializes a {@link User}. The {@link UserStatus} is set to