Skip to content

Commit

Permalink
Fix for issue JamesNK#2372 - variable typo in JsonWriter.cs and JsonT…
Browse files Browse the repository at this point in the history
…extWriterTest.cs
  • Loading branch information
davidomid committed Feb 1, 2021
1 parent 5a35c77 commit d086868
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Src/Newtonsoft.Json.Tests/JsonTextWriterTest.cs
Expand Up @@ -1217,7 +1217,7 @@ public void BuildStateArray()
{
JsonWriter.State[][] stateArray = JsonWriter.BuildStateArray();

var valueStates = JsonWriter.StateArrayTempate[7];
var valueStates = JsonWriter.StateArrayTemplate[7];

foreach (JsonToken valueToken in GetValues(typeof(JsonToken)))
{
Expand Down
8 changes: 4 additions & 4 deletions Src/Newtonsoft.Json/JsonWriter.cs
Expand Up @@ -62,7 +62,7 @@ internal enum State
// array that gives a new state based on the current state an the token being written
private static readonly State[][] StateArray;

internal static readonly State[][] StateArrayTempate = new[]
internal static readonly State[][] StateArrayTemplate = new[]
{
// Start PropertyName ObjectStart Object ArrayStart Array ConstructorStart Constructor Closed Error
//
Expand All @@ -78,9 +78,9 @@ internal enum State

internal static State[][] BuildStateArray()
{
List<State[]> allStates = StateArrayTempate.ToList();
State[] errorStates = StateArrayTempate[0];
State[] valueStates = StateArrayTempate[7];
List<State[]> allStates = StateArrayTemplate.ToList();
State[] errorStates = StateArrayTemplate[0];
State[] valueStates = StateArrayTemplate[7];

EnumInfo enumValuesAndNames = EnumUtils.GetEnumValuesAndNames(typeof(JsonToken));

Expand Down

0 comments on commit d086868

Please sign in to comment.