Skip to content

Commit

Permalink
fix(stleary#887): corrected small typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkarth committed Apr 14, 2024
1 parent fe597d2 commit ce074e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/json/JSONArray.java
Expand Up @@ -107,7 +107,7 @@ public JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)
}
if (nextChar != ']') {
x.back();
for (;;) {
for (; ; ) {
if (x.nextClean() == ',') {
x.back();
this.myArrayList.add(JSONObject.NULL);
Expand Down Expand Up @@ -158,9 +158,9 @@ public JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)
* @throws JSONException if input is not compliant with strict mode guidelines;
*/
private void validateInput(JSONTokener x) {
char nextChar = x.getPrevious();
char cursor = x.getPrevious();

boolean isEndOfArray = nextChar == ']';
boolean isEndOfArray = cursor == ']';
boolean nextCharacterIsNotEoF = x.nextClean() != 0;

if (isEndOfArray && nextCharacterIsNotEoF) {
Expand Down

0 comments on commit ce074e9

Please sign in to comment.