1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-16 23:40:51 -07:00

cleanup of minor warnings

This commit is contained in:
John J. Aylward 2018-10-02 13:14:22 -04:00
parent a63fa03062
commit bc347d2c19
4 changed files with 4 additions and 5 deletions

View file

@ -1491,7 +1491,7 @@ public class JSONArray implements Iterable<Object> {
* @return true if JSONArray is empty, otherwise false.
*/
public boolean isEmpty() {
return myArrayList.isEmpty();
return this.myArrayList.isEmpty();
}
}

View file

@ -233,8 +233,8 @@ public class JSONPointer {
int index = Integer.parseInt(indexToken);
JSONArray currentArr = (JSONArray) current;
if (index >= currentArr.length()) {
throw new JSONPointerException(format("index %d is out of bounds - the array has %d elements", index,
currentArr.length()));
throw new JSONPointerException(format("index %s is out of bounds - the array has %d elements", indexToken,
Integer.valueOf(currentArr.length())));
}
try {
return currentArr.get(index);

View file

@ -1,7 +1,6 @@
package org.json;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Map;

View file

@ -135,7 +135,7 @@ public class XMLTokener extends JSONTokener {
* @return A Character or an entity String if the entity is not recognized.
* @throws JSONException If missing ';' in XML entity.
*/
public Object nextEntity(char ampersand) throws JSONException {
public Object nextEntity(@SuppressWarnings("unused") char ampersand) throws JSONException {
StringBuilder sb = new StringBuilder();
for (;;) {
char c = next();