修复CopyOptions.setIgnoreCase和setIgnoreProperties冲突问题

This commit is contained in:
Looly 2023-09-12 18:28:45 +08:00
parent 8c4b1262ef
commit 6ad0a55362
2 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,7 @@
* 【core 】 修复Tailer stop NPE问题pr#1067@Gitee
* 【json 】 修复toJSONString导致CPU使用率高的问题issue#3297@Github
* 【core 】 修复NumberUtil.parseInt 16进制解析错误的问题pr#1071@Gitee
* 【core 】 修复CopyOptions.setIgnoreCase和setIgnoreProperties冲突问题issue#I80FP4@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.8.21(2023-07-29)

View File

@ -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;