Skip to content

Commit 6594c90

Browse files
halter73Kahbazidavidfowl
authored
Apply suggestions from code review
Co-authored-by: Kahbazi <[email protected]> Co-authored-by: David Fowler <[email protected]>
1 parent cbff9e8 commit 6594c90

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private static RouteEndpointDataSource GetOrAddRouteEndpointDataSource(this IEnd
426426
var routeHandlerOptions = endpoints.ServiceProvider?.GetService<IOptions<RouteHandlerOptions>>();
427427
var throwOnBadRequest = routeHandlerOptions?.Value.ThrowOnBadRequest ?? false;
428428

429-
routeEndpointDataSource = new RouteEndpointDataSource(endpoints.ServiceProvider ?? new EmptyServiceProvider(), throwOnBadRequest);
429+
routeEndpointDataSource = new RouteEndpointDataSource(endpoints.ServiceProvider ?? EmptyServiceProvider.Instance, throwOnBadRequest);
430430
endpoints.DataSources.Add(routeEndpointDataSource);
431431
}
432432

src/Http/Routing/test/UnitTests/RouteEndpointBuilderTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public void Build_AllValuesSet_EndpointCreated()
3232
[Fact]
3333
public async void Build_DoesNot_RunFilters()
3434
{
35-
3635
var endpointFilterCallCount = 0;
3736
var invocationFilterCallCount = 0;
3837
var invocationCallCount = 0;

0 commit comments

Comments
 (0)