Diff.GetHashCode() throws a NullReferenceException

Author: dafbyteCreated Mar 21, 2023Updated Mar 21, 2023

The C# implementation doesn't consider null value for the text field.

The following line shows how to reproduce. This will not raise a warning on .NET Framework variations (v2.0, v3.x, v4.x).

Diff diff = new Diff(Operation.EQUAL, null);
int hashCode = diff.GetHashCode();