Skip to content

Commit 72e1c93

Browse files
committed
Improved toXml
1 parent 417358e commit 72e1c93

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/main/java/com/github/underscore/U.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,8 @@ public static FetchResponse fetch(
22602260
}
22612261
}
22622262

2263-
public static int readWithRetry(java.io.InputStream inputStream, byte[] buffer) throws java.io.IOException {
2263+
public static int readWithRetry(java.io.InputStream inputStream, byte[] buffer)
2264+
throws java.io.IOException {
22642265
java.io.IOException lastException = null;
22652266
for (int attempt = 0; attempt < 2; attempt++) {
22662267
try {

‎src/main/java/com/github/underscore/Xml.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,8 @@ private static void checkLocalMap(
11931193
|| localMap2.size() != 1
11941194
|| XmlValue.getMapKey(localMap2).startsWith("-")
11951195
|| XmlValue.getMapValue(localMap2) instanceof List) {
1196-
if (ROOT.equals(XmlValue.getMapKey(localMap2))) {
1196+
if (ROOT.equals(XmlValue.getMapKey(localMap2))
1197+
&& XmlValue.getMapValue(localMap2) instanceof List) {
11971198
writeArray((List) XmlValue.getMapValue(localMap2), builder, arrayTrue);
11981199
} else {
11991200
XmlObject.writeXml(

0 commit comments

Comments
 (0)