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

This reverts commit 9846fa5145.
This commit is contained in:
Ren You
2021-06-28 09:55:31 -07:00
committed by GitHub
parent d586873275
commit 2be0d57fa2
18 changed files with 68 additions and 30 deletions

View File

@@ -28,7 +28,20 @@ class RunningProcessInfo {
}
@override
int get hashCode => Object.hash(pid, commandLine, creationDate);
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;
}
@override
String toString() {