jfinal / jfinal

JAVA WEB + ORM Framework
https://jfinal.com
Apache License 2.0
3.24k stars 1.32k forks source link

switch表达式解析 对null值识别有误 #207

Closed ily55421 closed 11 months ago

ily55421 commented 11 months ago
@Ignore
@Test
public void switch_() {
    Template template = engine.getTemplate("com/jfinal/template/switch.txt");
    Kv kv = Kv.by("data", null).set("b", 123);
    String ret = template.renderToString(kv);
    System.out.print(ret); // 输出结果为 a,b,c   而不是default

}
ily55421 commented 11 months ago

image 在获取abc 的case匹配时 是匹配的id 语法解析器 从上下文获取不到数据