diff --git a/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs b/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs index 2052f60cd2..14fec8660b 100644 --- a/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs +++ b/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs @@ -208,11 +208,6 @@ protected bool ReadImplementation() result = this.ReadAtCollectionEndImplementation(); break; - case ODataCollectionReaderState.Exception: // fall through - case ODataCollectionReaderState.Completed: - Debug.Assert(false, "This case should have been caught earlier."); - throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCore_ReadImplementation)); - default: Debug.Assert(false, "Unsupported collection reader state " + this.State + " detected."); throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCore_ReadImplementation)); diff --git a/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs b/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs index 79703d1982..1ef09e1d1f 100644 --- a/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs +++ b/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs @@ -86,11 +86,6 @@ protected override Task ReadAsynchronously() case ODataCollectionReaderState.CollectionEnd: return this.ReadAtCollectionEndImplementationAsync(); - case ODataCollectionReaderState.Exception: // fall through - case ODataCollectionReaderState.Completed: - Debug.Assert(false, "This case should have been caught earlier."); - return TaskUtils.GetFaultedTask(new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCoreAsync_ReadAsynchronously))); - default: Debug.Assert(false, "Unsupported collection reader state " + this.State + " detected."); return TaskUtils.GetFaultedTask(new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCoreAsync_ReadAsynchronously)));