Skip to content

Commit e8963ce

Browse files
committed
aesthetics only -- removing import static
1 parent 95e1d1f commit e8963ce

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sources/net.sf.j2s.java.core/src/org/json/JSONPointer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.json;
22

3-
import static java.lang.String.format;
4-
53
import java.io.UnsupportedEncodingException;
64
import java.net.URLDecoder;
75
import java.net.URLEncoder;
@@ -213,7 +211,7 @@ public Object queryFrom(Object document) throws JSONPointerException {
213211
} else if (current instanceof JSONArray) {
214212
current = readByIndexToken(current, token);
215213
} else {
216-
throw new JSONPointerException(format(
214+
throw new JSONPointerException(String.format(
217215
"value [%s] is not an array or object therefore its key %s cannot be resolved", current,
218216
token));
219217
}
@@ -233,7 +231,7 @@ private Object readByIndexToken(Object current, String indexToken) throws JSONPo
233231
int index = Integer.parseInt(indexToken);
234232
JSONArray currentArr = (JSONArray) current;
235233
if (index >= currentArr.length()) {
236-
throw new JSONPointerException(format("index %d is out of bounds - the array has %d elements", index,
234+
throw new JSONPointerException(String.format("index %d is out of bounds - the array has %d elements", index,
237235
currentArr.length()));
238236
}
239237
try {
@@ -242,7 +240,7 @@ private Object readByIndexToken(Object current, String indexToken) throws JSONPo
242240
throw new JSONPointerException("Error reading value at index position " + index, e);
243241
}
244242
} catch (NumberFormatException e) {
245-
throw new JSONPointerException(format("%s is not an array index", indexToken), e);
243+
throw new JSONPointerException(String.format("%s is not an array index", indexToken), e);
246244
}
247245
}
248246

0 commit comments

Comments
 (0)