mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix BeanDesc bug
This commit is contained in:
@@ -12,6 +12,7 @@ import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -679,4 +680,24 @@ public class BeanUtilTest {
|
||||
String childMotherName;
|
||||
String childFatherName;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issueI41WKPTest(){
|
||||
Test1 t1 = new Test1().setStrList(ListUtil.toList("list"));
|
||||
Test2 t2_hu = new Test2();
|
||||
BeanUtil.copyProperties(t1, t2_hu, CopyOptions.create().setIgnoreError(true));
|
||||
Assert.assertNull(t2_hu.getStrList());
|
||||
}
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Test1 {
|
||||
private List<String> strList;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Test2 {
|
||||
private List<Integer> strList;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user