Details
Description
IGNITE-20479 replaced custom null checks with standard ArgumentNullException.ThrowIfNull. However, ThrowIfNull takes object, which involves boxing for value types. Therefore we do heap allocations just to validate arguments in some cases, such as generic record/key/value validation in KeyValueView and RecordView. Bring back the custom generic validation method to fix this.
Also, ToKv method validates the wrong thing twice:
private static KvPair<TK, TV> ToKv(KeyValuePair<TK, TV> x) { ArgumentNullException.ThrowIfNull(x); ArgumentNullException.ThrowIfNull(x); return new(x.Key, x.Value); }
Attachments
Issue Links
- is caused by
-
IGNITE-20479 .NET: Thin 3.0: Replace IgniteArgumentCheck.NotNull with ArgumentNullException.ThrowIfNull
- Resolved
- links to