cognitect / cognitect/transit-java
Override equals() and hashCode() in Impl-Classes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 65
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
I think LinkImpl, RatioImpl etc. should override equals() and hashCode() more consistently.
LinkImpldoesn't override any of the twoRatioImploverridesequals(), but nothashCode(). And the implementation ofequals()relies on object identity of the numerators und denominators
My suggestions would be to generate all equals and hashCode implementations for these classes with your IDE of choice.
I would have created a pr, but I read you dont accept any...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting LinkImpl, RatioImpl, and the other implementation classes to compare their existing equals() and hashCode() behavior. Done means the relevant classes consistently satisfy the equals/hashCode contract, including a decided treatment of numerator and denominator identity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100