修复时间戳转Bean时异常问题

This commit is contained in:
Looly 2023-12-14 21:49:23 +08:00
parent 9bb370c476
commit 3fc8da755f
2 changed files with 24 additions and 0 deletions

View File

@ -24,6 +24,7 @@
* 【db 】 修复嵌套SQL中order by子句错误截断问题issue#I89RXV@Gitee
* 【http 】 修复graalvm编译后未读取Content-Length可能导致的读取时间过长问题issue#I6Q30X@Gitee
* 【core 】 修复JavaSourceCompiler.addSource目录处理错误问题issue#3425@Github
* 【core 】 修复时间戳转Bean时异常问题issue#I8NMP7@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.8.23(2023-11-12)

View File

@ -0,0 +1,23 @@
package cn.hutool.json;
import lombok.Data;
import lombok.ToString;
import org.junit.Assert;
import org.junit.Test;
import java.util.Date;
public class IssueI8NMP7Test {
@Test
public void toBeanTest() {
final String jsonString = "{\"enableTime\":\"1702262524444\"}";
final DemoModel bean = JSONUtil.toBean(jsonString, JSONConfig.create(), DemoModel.class);
Assert.assertNotNull(bean.getEnableTime());
}
@Data
@ToString
static class DemoModel{
private Date enableTime;
}
}