I'll focus on Serializable, because Set cannot be replaced by annotation. Worse, its "contract" is enforced by nothing.
Regarding Serializable, it should be the class that offers the writeObject() method. It should also be a default method, just as List.sort() is. For the whole rationale behind default methods, please check this post.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'll focus on
Serializable
, becauseSet
cannot be replaced by annotation. Worse, its "contract" is enforced by nothing.Regarding
Serializable
, it should be the class that offers thewriteObject()
method. It should also be adefault
method, just asList.sort()
is. For the whole rationale behind default methods, please check this post.