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

style: enable EqualsHashCode in checkstyle #5157

Merged
merged 1 commit into from
May 12, 2024

Conversation

CodaBlurd
Copy link
Contributor

@CodaBlurd CodaBlurd commented May 12, 2024

Related to #5119.

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 38.24%. Comparing base (319d514) to head (1fa0c94).

Files Patch % Lines
...com/thealgorithms/datastructures/trees/KDTree.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5157      +/-   ##
============================================
- Coverage     38.25%   38.24%   -0.01%     
+ Complexity     2362     2361       -1     
============================================
  Files           516      516              
  Lines         15304    15305       +1     
  Branches       2957     2957              
============================================
- Hits           5854     5853       -1     
- Misses         9164     9165       +1     
- Partials        286      287       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vil02
Copy link
Member

vil02 commented May 12, 2024

Thanks!

I have two remarks:

  • if you want to reference an issue or another PR (from the same repository) do it by writing # followed by its number,
  • it seems to me that the method equals could be simplified to the form:
        @Override
        public boolean equals(Object obj) {
            if (obj instanceof Point other) {
                return Arrays.equals(other.coordinates, this.coordinates);
            }
            return false;
        }

Would you like to open another PR doing that?

@vil02 vil02 merged commit 5703be5 into TheAlgorithms:master May 12, 2024
5 checks passed
@CodaBlurd
Copy link
Contributor Author

Yes I will open another PR with the recommended changes. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

3 participants