Skip to content

changing ambiguous variable naming in BasicJsonParser.java#49837

Open
etaiami09-cmd wants to merge 3 commits intospring-projects:mainfrom
etaiami09-cmd:main
Open

changing ambiguous variable naming in BasicJsonParser.java#49837
etaiami09-cmd wants to merge 3 commits intospring-projects:mainfrom
etaiami09-cmd:main

Conversation

@etaiami09-cmd
Copy link
Copy Markdown

in parseMapInternal, inside the for loop that handles tokens from tokenize(json), there is a variable named "values" that should have a different name. Semantically, it holds the trimmed strings of the key and the value of the JSON pair, but someone reading the code might think it only holds the value of the pair.
This pull request changes the variable name to "rawSplit", because it was built off the untrimmed String array named "split" and because after that it is seperated into variables called rawKey and rawValue.

fixed an ambiguous variable name - the name "values" makes no sense when working with a key-value pair, since a reader will associate it with the value only when it contains both a value and a key.

Signed-off-by: Etai codes <etaiami09@gmail.com>
earlier search & replace accidentally overrode doc string

Signed-off-by: Etai codes <etaiami09@gmail.com>
fixed another search & replace error

Signed-off-by: Etai codes <etaiami09@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants