-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
You have to make all components |
LGTM, but we have to wait until the discussion in #129 is finished. |
Looks good to me, although I would like to see tests that try to serialize and deserialize at least a little more complicated object graph. I would suggest one where you (de-)serialize a user with an email address and a multivalued attribute? |
@wallner Thanks for your comment. I updated my PR. |
User user = new User.Builder("UserName") | ||
.addEmail(new Email.Builder().setValue('[email protected]').setType(Email.Type.WORK).build()) | ||
.addPhoneNumber(new PhoneNumber.Builder().setDisplay("phone").setType(PhoneNumber.Type.FAX).build()) | ||
.setActive(true).build() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an extension too, please?
|
||
private void readObject(ObjectInputStream objectInputStream) throws ClassNotFoundException, IOException { | ||
objectInputStream.defaultReadObject(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this empty line
Thanks! |
Please add a |
Done. I assume this is a change. If anyone disagrees, please tell me. |
Looks good from my side. |
@@ -199,6 +206,8 @@ public MemberRef build() { | |||
* Represents an Member reference type. | |||
*/ | |||
public static class Type extends MultiValuedAttributeType { | |||
private static final long serialVersionUID = 5163337803191562964L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed, because this sub-class does not define any additional fields.
Fixes #129 The classes `User` and `Group` implement the interface `Serializable` and have a `serialVersionUID` field. This is also true for the classes that are used for fields of `User` and `Group`. A test for each of the classes tests that no exception is thrown when serializing and deserializing the object, and that the deserialized is equal to the original.
Make User and Group Serializable
Thank you |
Fixes #129
The classes implement the interface
Serializable
and have aserialVersionUID
field.A test for each of the classes tests that no exception is thrown when
serializing and deserializing the object, and that the deserialized is
equal to the original.