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 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);
}

View File

@ -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