Skip to content

Commit 1bdaacc

Browse files
authored
Merge pull request #989 from AlexCai2019/master
Minor refactoring
2 parents 32e56da + c882783 commit 1bdaacc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/json/JSONObject.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,13 +2753,13 @@ private static Object wrap(Object object, Set<Object> objectsRecord, int recursi
27532753
return NULL;
27542754
}
27552755
if (object instanceof JSONObject || object instanceof JSONArray
2756-
|| NULL.equals(object) || object instanceof JSONString
2756+
|| object instanceof JSONString || object instanceof String
27572757
|| object instanceof Byte || object instanceof Character
27582758
|| object instanceof Short || object instanceof Integer
27592759
|| object instanceof Long || object instanceof Boolean
27602760
|| object instanceof Float || object instanceof Double
2761-
|| object instanceof String || object instanceof BigInteger
2762-
|| object instanceof BigDecimal || object instanceof Enum) {
2761+
|| object instanceof BigInteger || object instanceof BigDecimal
2762+
|| object instanceof Enum) {
27632763
return object;
27642764
}
27652765

src/main/java/org/json/JSONPointer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static Object readByIndexToken(Object current, String indexToken) throws
246246
*/
247247
@Override
248248
public String toString() {
249-
StringBuilder rval = new StringBuilder("");
249+
StringBuilder rval = new StringBuilder();
250250
for (String token: this.refTokens) {
251251
rval.append('/').append(escape(token));
252252
}

0 commit comments

Comments
 (0)