OData / odata.net

ODataLib: Open Data Protocol - .NET Libraries and Frameworks
https://docs.microsoft.com/odata
Other
675 stars 348 forks source link

Fix async wrapper over sync API in reading nested property info #2995

Closed gathogojr closed 3 weeks ago

gathogojr commented 4 weeks ago

Description

Fix async wrapper over sync API in reading nested property info - prevent inadvertent sync IO

This is why/how the sync method was being called: https://github.com/OData/odata.net/blob/383e29f3cb96eda22e76d19df7bdab11459377b8/src/Microsoft.OData.Core/ODataReaderCoreAsync.cs#L88-L91

The async methods are declared in the ODataReaderCoreAsync base class and their default implementation is to wrap the sync method.

If they're not overridden in the derived class, they'll do sync IO. The ReadAtNestedPropertyInfoImplementationAsync was inadvertently not overridden in ODataJsonLightReader class.

Checklist (Uncheck if it is not completed)