mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 11:05:28 -04:00
more sonarcube issues
This commit is contained in:
parent
ebd9a17a3b
commit
38c3a0bb3f
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user