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:
AlexCai2019
2025-06-23 01:23:15 +08:00
parent 32e56da786
commit aac376f305
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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));
}