This commit is contained in:
Looly 2020-12-01 15:38:11 +08:00
parent 23ee2d623a
commit 3fa50ded57
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@
* 【core 】 修改IoUtil.read(Reader)逻辑默认关闭Reader
* 【core 】 ZipUtil增加Zip方法pr#222@Gitee
* 【all 】 增加Hutool.getAllUtils和printAllUtils方法
* 【all 】 增加PonyCodeissue#1268@Gitee
* 【core 】 增加PunyCodeissue#1268@Gitee
### Bug修复
* 【cron 】 修复CronTimer可能死循环的问题issue#1224@Github

View File

@ -1,5 +1,6 @@
package cn.hutool.extra.expression;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.lang.Dict;
import cn.hutool.extra.expression.engine.aviator.AviatorEngine;
@ -16,7 +17,7 @@ public class AviatorTest {
@Test
public void simpleTest(){
Foo foo = new Foo(100, 3.14f, new Date());
Foo foo = new Foo(100, 3.14f, DateUtil.parseDate("2020-11-12"));
ExpressionEngine engine = new AviatorEngine();
String exp =
"\"[foo i=\"+ foo.i + \", f=\" + foo.f + \", date.year=\" + (foo.date.year+1900) + \", date.month=\" + foo.date.month + \", bars[0].name=\" + #foo.bars[0].name + \"]\"";