This reverts commit 9846fa5145.
This commit is contained in:
@@ -911,7 +911,11 @@ class _Asset {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(baseDir, relativeUri, entryUri.hashCode);
|
||||
int get hashCode {
|
||||
return baseDir.hashCode
|
||||
^ relativeUri.hashCode
|
||||
^ entryUri.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
// Given an assets directory like this:
|
||||
|
||||
@@ -128,7 +128,10 @@ class Fingerprint {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(Object.hashAllUnordered(_checksums.keys), Object.hashAllUnordered(_checksums.values));
|
||||
// Ignore map entries here to avoid becoming inconsistent with equals
|
||||
// due to differences in map entry order. This is a really bad hash
|
||||
// function and should eventually be deprecated and removed.
|
||||
int get hashCode => _checksums.length.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => '{checksums: $_checksums}';
|
||||
|
||||
@@ -98,7 +98,7 @@ class Version implements Comparable<Version> {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(major, minor, patch);
|
||||
int get hashCode => major ^ minor ^ patch;
|
||||
|
||||
bool operator <(Version other) => compareTo(other) < 0;
|
||||
bool operator >(Version other) => compareTo(other) > 0;
|
||||
|
||||
@@ -278,7 +278,7 @@ class ValidationMessage {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(type, message, contextUrl);
|
||||
int get hashCode => type.hashCode ^ message.hashCode ^ contextUrl.hashCode;
|
||||
}
|
||||
|
||||
class NoIdeValidator extends DoctorValidator {
|
||||
|
||||
@@ -302,7 +302,7 @@ class XcodeProjectBuildContext {
|
||||
final EnvironmentType environmentType;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(scheme, configuration, environmentType);
|
||||
int get hashCode => scheme.hashCode ^ configuration.hashCode ^ environmentType.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
|
||||
@@ -129,7 +129,9 @@ class LocaleInfo implements Comparable<LocaleInfo> {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => originalString.hashCode;
|
||||
int get hashCode {
|
||||
return originalString.hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
@@ -326,7 +326,12 @@ class CustomDimensions {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hashAll(toMap().values);
|
||||
int get hashCode =>
|
||||
toMap()
|
||||
.values
|
||||
.where((String element) => element != null)
|
||||
.fold(Object().hashCode,
|
||||
(int value, String element) => value ^ element.hashCode);
|
||||
}
|
||||
|
||||
/// List of all fields used in CustomDimensions.
|
||||
|
||||
@@ -486,7 +486,7 @@ class TestUsageCommand {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(command, parameters);
|
||||
int get hashCode => command.hashCode ^ parameters.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => 'TestUsageCommand($command, parameters:$parameters)';
|
||||
@@ -514,7 +514,11 @@ class TestUsageEvent {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(category, parameter, label, value, parameters);
|
||||
int get hashCode => category.hashCode ^
|
||||
parameter.hashCode ^
|
||||
label.hashCode ^
|
||||
value.hashCode ^
|
||||
parameters.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => 'TestUsageEvent($category, $parameter, label:$label, value:$value, parameters:$parameters)';
|
||||
@@ -540,7 +544,10 @@ class TestTimingEvent {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(category, variableName, duration, label);
|
||||
int get hashCode => category.hashCode ^
|
||||
variableName.hashCode ^
|
||||
duration.hashCode ^
|
||||
label.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => 'TestTimingEvent($category, $variableName, $duration, label:$label)';
|
||||
|
||||
@@ -326,5 +326,5 @@ class VsCodeInstallLocation {
|
||||
|
||||
@override
|
||||
// Lowest bit is for isInsiders boolean.
|
||||
int get hashCode => Object.hash(installPath, extensionsFolder, edition);
|
||||
int get hashCode => installPath.hashCode ^ extensionsFolder.hashCode ^ edition.hashCode;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ class CleanWorkspaceCall {
|
||||
verbose == other.verbose;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(workspacePath, scheme, verbose);
|
||||
int get hashCode => workspacePath.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => '{$workspacePath, $scheme, $verbose}';
|
||||
|
||||
Reference in New Issue
Block a user