mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
more sonarcube issues
This commit is contained in:
@@ -200,10 +200,6 @@ public class JSONObject {
|
|||||||
*/
|
*/
|
||||||
public JSONObject(JSONTokener x, JSONParserConfiguration jsonParserConfiguration) throws JSONException {
|
public JSONObject(JSONTokener x, JSONParserConfiguration jsonParserConfiguration) throws JSONException {
|
||||||
this();
|
this();
|
||||||
char c;
|
|
||||||
String key;
|
|
||||||
Object obj;
|
|
||||||
|
|
||||||
boolean isInitial = x.getPrevious() == 0;
|
boolean isInitial = x.getPrevious() == 0;
|
||||||
|
|
||||||
if (x.nextClean() != '{') {
|
if (x.nextClean() != '{') {
|
||||||
@@ -227,8 +223,8 @@ public class JSONObject {
|
|||||||
private boolean parseJSONObject(JSONTokener jsonTokener, JSONParserConfiguration jsonParserConfiguration, boolean isInitial) {
|
private boolean parseJSONObject(JSONTokener jsonTokener, JSONParserConfiguration jsonParserConfiguration, boolean isInitial) {
|
||||||
Object obj;
|
Object obj;
|
||||||
String key;
|
String key;
|
||||||
char c;
|
boolean doneParsing = false;
|
||||||
c = jsonTokener.nextClean();
|
char c = jsonTokener.nextClean();
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -268,10 +264,10 @@ public class JSONObject {
|
|||||||
|
|
||||||
// Pairs are separated by ','.
|
// Pairs are separated by ','.
|
||||||
if (parseEndOfKeyValuePair(jsonTokener, jsonParserConfiguration, isInitial)) {
|
if (parseEndOfKeyValuePair(jsonTokener, jsonParserConfiguration, isInitial)) {
|
||||||
return true;
|
doneParsing = true;
|
||||||
}
|
}
|
||||||
// Not finished parsing
|
|
||||||
return false;
|
return doneParsing;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user