From 42f6aa199b39c48b76ac870af0664582ad1381a0 Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Wed, 14 May 2014 17:11:38 -0500 Subject: [PATCH] Octathorpes have no case. Swapped in StringComparison.Ordinal for the literal comparison against [ and ] since those are non-caseable. This is a micro-improvement, but still good practice. --- Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs index 1688eb49..72973e7f 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs @@ -98,7 +98,7 @@ namespace Newtonsoft.Json.Schema { string reference = schema.DeferredReference; - bool locationReference = (reference.StartsWith("#", StringComparison.OrdinalIgnoreCase)); + bool locationReference = (reference.StartsWith("#", StringComparison.Ordinal)); if (locationReference) reference = UnescapeReference(reference); @@ -445,4 +445,4 @@ namespace Newtonsoft.Json.Schema return JsonSchemaConstants.JsonSchemaTypeMapping.Single(kv => kv.Value == type).Key; } } -} \ No newline at end of file +}