From 7f0aa19744df40c8dfe1da2dd89786ca45f5e360 Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Wed, 14 May 2014 17:17:15 -0500 Subject: [PATCH] Periods have no case. Swapped in StringComparison.Ordinal for the literal comparison against . since those are non-caseable. This is a micro-improvement, but still good practice. --- Src/Newtonsoft.Json/JsonPosition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/JsonPosition.cs b/Src/Newtonsoft.Json/JsonPosition.cs index cbd32f92..1e2f0628 100644 --- a/Src/Newtonsoft.Json/JsonPosition.cs +++ b/Src/Newtonsoft.Json/JsonPosition.cs @@ -96,7 +96,7 @@ namespace Newtonsoft.Json { message = message.Trim(); - if (!message.EndsWith(".")) + if (!message.EndsWith(".", StringComparison.Ordinal)) message += "."; message += " "; @@ -112,4 +112,4 @@ namespace Newtonsoft.Json return message; } } -} \ No newline at end of file +}