diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1e6b70f..ec6a18d4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ## 5.1.2 ### 新特性 +* 【core 】 XmlUtil支持可选是否输出omit xml declaration(pr#732@Gtihub) ### Bug修复 * 【core 】 修复isExpired的bug(issue#733@Gtihub) diff --git a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java b/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java index c4bf446ad..fdac8e5eb 100644 --- a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java @@ -809,7 +809,7 @@ public class XmlUtil { childEle = (Element) childNode; final Object value = result.get(childEle.getNodeName()); - Object newValue = null; + Object newValue; if (childEle.hasChildNodes()) { // 子节点继续递归遍历 final Map map = xmlToMap(childEle);