Closed
Description
Description
The implementation of SecurityIdentifier.CompareTo
does not allow comparing against null
, which goes against the interface definition of IComparable<T>.CompareTo
. According to that interface, the input to the method is T?
, and should return 1
according to these doc's remarks.
Reproduction Steps
SecurityIdentifier sid = new SecurityIdentifier(. . .);
sid.CompareTo(null);
Expected behavior
CompareTo
should return 1
,
Actual behavior
An exception is thrown.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Tangentially related to #99722