mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复CopyOptions.setIgnoreCase和setIgnoreProperties冲突问题
This commit is contained in:
@@ -18,6 +18,18 @@ public class IssueI80FP4Test {
|
||||
Assert.assertNull(dest.getEnderDest());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copyPropertiesTest2() {
|
||||
final Dest sourceDest = new Dest();
|
||||
sourceDest.setCPF(33699);
|
||||
sourceDest.setEnderDest("abc");
|
||||
|
||||
final Dest dest = new Dest();
|
||||
final CopyOptions copyOptions = CopyOptions.create().setIgnoreNullValue(true).setIgnoreCase(true).setIgnoreProperties("enderdest");
|
||||
BeanUtil.copyProperties(sourceDest, dest, copyOptions);
|
||||
Assert.assertNull(dest.getEnderDest());
|
||||
}
|
||||
|
||||
@Data
|
||||
static class Dest{
|
||||
private int cPF;
|
||||
|
Reference in New Issue
Block a user