diff --git a/src/Http/Routing/src/Matching/FastPathTokenizer.cs b/src/Http/Routing/src/Matching/FastPathTokenizer.cs index 79fab9591f..e2fc66ab30 100644 --- a/src/Http/Routing/src/Matching/FastPathTokenizer.cs +++ b/src/Http/Routing/src/Matching/FastPathTokenizer.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Routing.Matching public static int Tokenize(string path, Span segments) { // This can happen in test scenarios. - if (path == string.Empty) + if (string.IsNullOrEmpty(path)) { return 0; }