mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Remove a redundant condition and an empty string
Remove "NULL.equals(object)" on line 2756 of JSONObject.java since line 2752 has already tested it. Remove the empty string on line 249 of JSONPointer.java.
This commit is contained in:
parent
32e56da786
commit
aac376f305
@ -2752,8 +2752,7 @@ public class JSONObject {
|
||||
if (NULL.equals(object)) {
|
||||
return NULL;
|
||||
}
|
||||
if (object instanceof JSONObject || object instanceof JSONArray
|
||||
|| NULL.equals(object) || object instanceof JSONString
|
||||
if (object instanceof JSONObject || object instanceof JSONArray || object instanceof JSONString
|
||||
|| object instanceof Byte || object instanceof Character
|
||||
|| object instanceof Short || object instanceof Integer
|
||||
|| object instanceof Long || object instanceof Boolean
|
||||
|
@ -246,7 +246,7 @@ public class JSONPointer {
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder rval = new StringBuilder("");
|
||||
StringBuilder rval = new StringBuilder();
|
||||
for (String token: this.refTokens) {
|
||||
rval.append('/').append(escape(token));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user