Skip to content

Commit bc347d2

Browse files
author
John J. Aylward
committed
cleanup of minor warnings
1 parent a63fa03 commit bc347d2

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

JSONArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ public List<Object> toList() {
14911491
* @return true if JSONArray is empty, otherwise false.
14921492
*/
14931493
public boolean isEmpty() {
1494-
return myArrayList.isEmpty();
1494+
return this.myArrayList.isEmpty();
14951495
}
14961496

14971497
}

JSONPointer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ private Object readByIndexToken(Object current, String indexToken) throws JSONPo
233233
int index = Integer.parseInt(indexToken);
234234
JSONArray currentArr = (JSONArray) current;
235235
if (index >= currentArr.length()) {
236-
throw new JSONPointerException(format("index %d is out of bounds - the array has %d elements", index,
237-
currentArr.length()));
236+
throw new JSONPointerException(format("index %s is out of bounds - the array has %d elements", indexToken,
237+
Integer.valueOf(currentArr.length())));
238238
}
239239
try {
240240
return currentArr.get(index);

JSONWriter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.json;
22

33
import java.io.IOException;
4-
import java.math.BigDecimal;
54
import java.util.Collection;
65
import java.util.Map;
76

XMLTokener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public Object nextContent() throws JSONException {
135135
* @return A Character or an entity String if the entity is not recognized.
136136
* @throws JSONException If missing ';' in XML entity.
137137
*/
138-
public Object nextEntity(char ampersand) throws JSONException {
138+
public Object nextEntity(@SuppressWarnings("unused") char ampersand) throws JSONException {
139139
StringBuilder sb = new StringBuilder();
140140
for (;;) {
141141
char c = next();

0 commit comments

Comments
 (0)