Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgSpec should not implement equals and hashCode #335

Closed
remkop opened this issue Apr 8, 2018 · 3 comments
Closed

ArgSpec should not implement equals and hashCode #335

remkop opened this issue Apr 8, 2018 · 3 comments
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Apr 8, 2018

Rename to equalsImpl(ArgSpec) and hashCodeImpl and make protected.

NOTE: the current implementation excludes these attributes:

  • showDefaultValue
  • converters
  • getter
  • setter
  • initialValue
  • toString

TBD remove equals/hashCode altogether from this object hierarchy?

@remkop remkop added this to the 3.0 milestone Apr 8, 2018
@remkop remkop closed this as completed in 44320ee Apr 9, 2018
@bbottema
Copy link
Contributor

I'm curious what the reasoning for this was. What was the issue?

@remkop
Copy link
Owner Author

remkop commented Aug 21, 2018

ArgSpec is an abstract superclass. See Josh Bloch’s Effective Java (3rd edition is worth buying btw)

@bbottema
Copy link
Contributor

Ahh, equals symmetry, got it. Yep, excellent book, I liked Refactoring (Martin) and Clean Coder (of course, Uncle Bob) as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants