mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 02:55: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 {
|
||||
this();
|
||||
char c;
|
||||
String key;
|
||||
Object obj;
|
||||
|
||||
boolean isInitial = x.getPrevious() == 0;
|
||||
|
||||
if (x.nextClean() != '{') {
|
||||
@ -227,8 +223,8 @@ public class JSONObject {
|
||||
private boolean parseJSONObject(JSONTokener jsonTokener, JSONParserConfiguration jsonParserConfiguration, boolean isInitial) {
|
||||
Object obj;
|
||||
String key;
|
||||
char c;
|
||||
c = jsonTokener.nextClean();
|
||||
boolean doneParsing = false;
|
||||
char c = jsonTokener.nextClean();
|
||||
|
||||
switch (c) {
|
||||
case 0:
|
||||
@ -268,10 +264,10 @@ public class JSONObject {
|
||||
|
||||
// Pairs are separated by ','.
|
||||
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