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

This commit is contained in:
Dan Field
2021-06-26 17:36:04 -07:00
committed by GitHub
parent a85811ac6c
commit 9846fa5145
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() {