Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make message class inheritable again
Some key properties of the class Message are private preventing any proper inheritance. Open them up by making them protected
- Loading branch information
c656520
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.
@mtangoo this is a design error. These properties should not be opened up for "proper inheritance".
c656520
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.
True that.
Feel free to add Getters/Setters and revert the fields to private.
To that end, the class should be final too.
Since the upcoming version will probably have some BC, it shouldn't be a big deal. Just add in changelog for people to use getters/setters as the fields are going private!
Thanks for your efforts and time
c656520
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.
I prefer final regardless; but do / did you have a use case for extending it?
c656520
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.
I do not even remember what use case resulted in this. It must be one of the issues. But definitely it was not good decision. Setters/Getters and final should have been the way to go!