paulirwin commented on code in PR #1056:
URL: https://github.com/apache/lucenenet/pull/1056#discussion_r1884098808
##########
src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs:
##########
@@ -67,6 +67,42 @@ public int CompareTo(Completion o)
{
return this.Utf8.CompareTo(o.Utf8);
}
+
+ // LUCENENET specific - per CS0660 and CS0661, we need to override
Equals and GetHashCode
+ public override bool Equals(object obj) => ReferenceEquals(this,
obj);
+
+ public override int GetHashCode()
+ {
+ unchecked
Review Comment:
Rider was giving a code analysis warning of having an override that just
calls to the base class. If you prefer it that way, I'll suppress that warning
for now. I figured it would be better to be explicit about the expectation of
the behavior of Equals.
--
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]