From d952d290dfc0cdffa18920787af516d8d91a9ebb Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Fri, 5 Jul 2024 04:33:56 -0500 Subject: [PATCH] prevent arithmetic overflow --- Tests/Dotmim.Sync.Tests/Models/AdventureWorksContext.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Tests/Dotmim.Sync.Tests/Models/AdventureWorksContext.cs b/Tests/Dotmim.Sync.Tests/Models/AdventureWorksContext.cs index 2efc3e36..52ccd0fc 100644 --- a/Tests/Dotmim.Sync.Tests/Models/AdventureWorksContext.cs +++ b/Tests/Dotmim.Sync.Tests/Models/AdventureWorksContext.cs @@ -1173,13 +1173,7 @@ protected override bool Equals(ModelCacheKey other) public override int GetHashCode() { - var hashCode = base.GetHashCode() * 397; - hashCode ^= this.useSchema.GetHashCode(); - hashCode ^= this.providerType.GetHashCode(); - hashCode ^= this.useSeeding.GetHashCode(); - hashCode ^= this.cstring.GetHashCode(); - - return hashCode; + return HashCode.Combine(base.GetHashCode(), useSchema, providerType, useSeeding, cstring); } } }