Skip to content

Commit

Permalink
Remove unreachable code block for collection reader.
Browse files Browse the repository at this point in the history
  • Loading branch information
biaol-odata authored and AlanWong-MS committed Jun 17, 2017
1 parent 9921bc3 commit c10013f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/Microsoft.OData.Core/ODataCollectionReaderCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
5 changes: 0 additions & 5 deletions src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ protected override Task<bool> 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<bool>(new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCoreAsync_ReadAsynchronously)));

default:
Debug.Assert(false, "Unsupported collection reader state " + this.State + " detected.");
return TaskUtils.GetFaultedTask<bool>(new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCoreAsync_ReadAsynchronously)));
Expand Down

0 comments on commit c10013f

Please sign in to comment.