Revert "Revert "Audit hashCode overrides outside of packages/flutter (#85370)" (#85451)" (#85567)

This reverts commit 2be0d57fa2.
This commit is contained in:
Dan Field
2021-06-30 09:46:54 -07:00
committed by GitHub
parent ae2442c8c6
commit e36e62e9a6
18 changed files with 30 additions and 68 deletions

View File

@@ -28,20 +28,7 @@ class RunningProcessInfo {
}
@override
int get hashCode {
// TODO(dnfield): Replace this when Object.hashValues lands, https://github.com/dart-lang/sdk/issues/11617
int hash = 17;
if (pid != null) {
hash = hash * 23 + pid.hashCode;
}
if (commandLine != null) {
hash = hash * 23 + commandLine.hashCode;
}
if (creationDate != null) {
hash = hash * 23 + creationDate.hashCode;
}
return hash;
}
int get hashCode => Object.hash(pid, commandLine, creationDate);
@override
String toString() {