Refactoring: Fix some sonarcube issues from recent commits by marilynel · Pull Request #1000 · stleary/JSON-java

What problem does this code solve?
Addresses SonarQube issues from recent commits. In the case of JSONObject populateMap(), there will be a marginal performance cost.
This is considered acceptable since bean parsing is not thought to be an especially common operation, and the cost is not high (2 method calls were added).

Does the code still compile with Java6?
Yes

Risks
Low

Changes to the API?
No

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No

Was any code refactored in this commit?
Yes, this PR is just refactoring

Review status
APPROVED

Starting 3-day comment window