diff --git a/JSONArray.java b/JSONArray.java index dd22046..9314438 100644 --- a/JSONArray.java +++ b/JSONArray.java @@ -1491,7 +1491,7 @@ public class JSONArray implements Iterable { * @return true if JSONArray is empty, otherwise false. */ public boolean isEmpty() { - return myArrayList.isEmpty(); + return this.myArrayList.isEmpty(); } } diff --git a/JSONPointer.java b/JSONPointer.java index fc0b04b..df06f22 100644 --- a/JSONPointer.java +++ b/JSONPointer.java @@ -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); diff --git a/JSONWriter.java b/JSONWriter.java index 8ef6084..a30a222 100644 --- a/JSONWriter.java +++ b/JSONWriter.java @@ -1,7 +1,6 @@ package org.json; import java.io.IOException; -import java.math.BigDecimal; import java.util.Collection; import java.util.Map; diff --git a/XMLTokener.java b/XMLTokener.java index 50e3acc..8490bec 100644 --- a/XMLTokener.java +++ b/XMLTokener.java @@ -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();