Use `ObjectsCompat.hash` or `Objects.hash` in `hashCode`
Categories
(GeckoView :: General, task, P3)
Tracking
(firefox96 fixed)
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: agi, Assigned: elizabbennet, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
There are a few spots where we implement hashCode
manually. We should just use Objects.hash
instead of rolling our own.
List here: https://searchfox.org/mozilla-central/search?q=hashCode()+%7B&case=false®exp=false&path=geckoview%2Fsrc%2Fmain (this list includes places where we return a single element's hash code, those are fine)
Example that we should change: https://searchfox.org/mozilla-central/rev/41c3ea3ee8eab9ce7b82932257cb80b703cbba67/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoResult.java#332-336
Reporter | ||
Updated•4 years ago
|
There is a few spots where a custom hashCode
implementation is being used.
This PR replaces them with Objects.hash
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
Note: the GeckoView minsdk is 16 so this cannot be implemented until we lift our minsdk to 19 at least.
Updated•3 years ago
|
Comment 3•2 years ago
|
||
agi, do you have any concern to land this since this isn't landed yet? Of course, it is necessary to rebase this change due to java format change.
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8becd2c40ec1 Use `Arrays.hashCode` insteads of custom `hashCode` implementation r=agi
Comment 6•2 years ago
|
||
bugherder |
Description
•