lukaszzborek commented on code in PR #4072:
URL: https://github.com/apache/iggy/pull/4072#discussion_r3944862469


##########
foreign/csharp/Iggy_SDK/Identifier.cs:
##########
@@ -151,6 +160,9 @@ public override bool Equals(object? obj)
     /// <inheritdoc />
     public override int GetHashCode()
     {
-        return HashCode.Combine((int)Kind, Value);
+        var hash = new HashCode();
+        hash.Add(Kind);
+        hash.AddBytes(Value);

Review Comment:
   added defensive copy on creating and return data. Introduced internal field 
to get data without additional allocation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to