mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
修复XmlUtil.xmlToBean空节点转换失败问题
This commit is contained in:
parent
7351aec47d
commit
143cd59b08
@ -19,8 +19,14 @@ import org.junit.Test;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/3136
|
||||
*/
|
||||
public class Issue3136Test {
|
||||
|
||||
/**
|
||||
* 此用例中,message节点无content,理解为空节点,转换为map后,此节点值为"",转为对象时,理应为null
|
||||
*/
|
||||
@Test
|
||||
public void xmlToBeanTest() {
|
||||
final String xmlStr = "<?xml version=\"1.0\" encoding=\"gbk\" ?><response><code>02</code><message></message></response>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user