Skip to content

Commit

Permalink
Fix code analysis warnings from using ToLower(CultureInfo.InvariantCu…
Browse files Browse the repository at this point in the history
…lture).
  • Loading branch information
TimLovellSmith committed May 24, 2016
1 parent 5f97447 commit 2707593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AutoRest/Modelers/Swagger/SchemaResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private Schema DereferenceInner(string referencePath, List<string> visitedRefere
referencePath = "#" + splitReference[1];
}

if (visitedReferences.Contains(referencePath.ToLower(CultureInfo.InvariantCulture)))
if (visitedReferences.Contains(referencePath.ToUpperInvariant()))
{
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
Properties.Resources.CircularReference, referencePath));
Expand All @@ -320,7 +320,7 @@ private Schema DereferenceInner(string referencePath, List<string> visitedRefere
{
throw new ArgumentException(Properties.Resources.ExceededMaximumReferenceDepth, referencePath);
}
visitedReferences.Add(referencePath.ToLower(CultureInfo.InvariantCulture));
visitedReferences.Add(referencePath.ToUpperInvariant());
var definitions = _serviceDefinition.Definitions;
if (definitions == null || !definitions.ContainsKey(referencePath.StripDefinitionPath()))
{
Expand Down

0 comments on commit 2707593

Please sign in to comment.