Skip to content

Release v20.33.9

Choose a tag to compare

@github-actions github-actions released this 03 Jun 20:12
3d07fad

Fixed

  • ProxyGenerator crash when processing nullable DateTimeOffset query parameters due to Nullable.GetUnderlyingType() returning null for MetadataLoadContext types

Summary

Nullable.GetUnderlyingType() is a runtime reflection API that accesses private CLR implementation details. When called on MetadataLoadContext Type objects (which are metadata-only and not backed by runtime types), it returns null, causing NullReferenceException.

The fix replaces Nullable.GetUnderlyingType(type) with type.GetGenericArguments()[0], which works correctly with metadata-only reflection used by ProxyGenerator's MetadataLoadContext.

This resolves Chronicle build failures when the ProxyGenerator encounters nullable value type query parameters like DateTimeOffset?, DateTime?, etc.