Skip to content

[grid][java] do not rely on .hashCode for .equals#12361

Merged
diemol merged 3 commits intoSeleniumHQ:trunkfrom
joerg1985:equals
Jul 17, 2023
Merged

[grid][java] do not rely on .hashCode for .equals#12361
diemol merged 3 commits intoSeleniumHQ:trunkfrom
joerg1985:equals

Conversation

@joerg1985
Copy link
Copy Markdown
Member

Description

Deeply compare the capabilities on .equals and use a fast way for .hashCode to get a hash.

Motivation and Context

The hash created by .hashCode is not perfect and might lead to collisions and false .equals results.
CapabilitiesTest.ensureEqualHashCodesMightBeNotEqual does show this effect.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 15, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f13370b) 57.28% compared to head (d98f681) 57.28%.

❗ Current head d98f681 differs from pull request most recent head f5b03ce. Consider uploading reports for the commit f5b03ce to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #12361   +/-   ##
=======================================
  Coverage   57.28%   57.28%           
=======================================
  Files          86       86           
  Lines        5333     5333           
  Branches      193      193           
=======================================
  Hits         3055     3055           
  Misses       2085     2085           
  Partials      193      193           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@diemol diemol merged commit 6865f1c into SeleniumHQ:trunk Jul 17, 2023
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.

3 participants