1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

change length comparison to isEmpty method

This commit is contained in:
Andrei_Paikin 2018-05-21 16:58:13 +03:00
parent a490ebdb78
commit 05074386d3
5 changed files with 25 additions and 25 deletions

View file

@ -178,7 +178,7 @@ public class JSONML {
newjo.accumulate(attribute, "");
}
}
if (arrayForm && newjo.length() > 0) {
if (arrayForm && !newjo.isEmpty()) {
newja.put(newjo);
}
@ -208,7 +208,7 @@ public class JSONML {
"' and '" + closeTag + "'");
}
tagName = null;
if (!arrayForm && newja.length() > 0) {
if (!arrayForm && !newja.isEmpty()) {
newjo.put("childNodes", newja);
}
if (ja == null) {