Skip to content

Commit e0c2da4

Browse files
update changes
1 parent a411a7f commit e0c2da4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/Microsoft.OData.Core/UriParser/Binders/InBinder.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -439,30 +439,29 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
439439
return true;
440440
}
441441

442-
bool onlyEmptyOrSpaces = true;
443-
bool insideQuotes = false;
442+
bool isEmptyOrHasOnlySpaces = true;
443+
bool isCharinsideQuotes = false;
444444
char quoteChar = '\0';
445-
List<string> items = new();
446445
Span<char> buffer = stackalloc char[content.Length];
447446
int bufferIndex = 0;
448447

449448
for (int i = 0; i < content.Length; i++)
450449
{
451450
char c = content[i];
452451

453-
if (insideQuotes)
452+
if (isCharinsideQuotes)
454453
{
455454
if (c == quoteChar)
456455
{
457-
insideQuotes = false;
456+
isCharinsideQuotes = false;
458457
}
459458
buffer[bufferIndex++] = c;
460459
}
461460
else
462461
{
463462
if (c == '"' || c == '\'')
464463
{
465-
insideQuotes = true;
464+
isCharinsideQuotes = true;
466465
quoteChar = c;
467466
buffer[bufferIndex++] = c;
468467
}
@@ -472,7 +471,7 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
472471

473472
if (!string.IsNullOrWhiteSpace(item))
474473
{
475-
onlyEmptyOrSpaces = false;
474+
isEmptyOrHasOnlySpaces = false;
476475
break;
477476
}
478477
bufferIndex = 0;
@@ -490,11 +489,11 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
490489

491490
if (!string.IsNullOrWhiteSpace(lastItem))
492491
{
493-
onlyEmptyOrSpaces = false;
492+
isEmptyOrHasOnlySpaces = false;
494493
}
495494
}
496495

497-
return onlyEmptyOrSpaces;
496+
return isEmptyOrHasOnlySpaces;
498497
}
499498
}
500499
}

0 commit comments

Comments
 (0)