youseries / ureport

UReport2 is a high-performance pure Java report engine based on Spring architecture, where complex Chinese-style statements and reports can be prepared by iterating over cells.
Apache License 2.0
2.02k stars 834 forks source link

表达式内容:"/img/"+"风险高"+".png" 运行表达式计算时候报错, java.util.EmptyStackException #331

Closed dongruilong closed 6 years ago

dongruilong commented 6 years ago

为了您的问题能得到及时准确解答,请认真填写下面各个选项,感谢您的配合。

运行的时候F2 不为空,G2=风险高

运行main方法测试如下: public static void main(String[] args) { long start=System.currentTimeMillis(); String expr="\"/img/\"+\"风险高\"+\".png\""; for(int i=0;i<1;i++) { ElCompute el=new ElCompute(); Object data=el.doCompute(expr); System.out.println(data); } long end=System.currentTimeMillis(); System.out.println(end-start); }

dongruilong commented 6 years ago

切换到上个版本的方法正常。

public Object evalExpr(String expression){
    return elCalculator.eval(expression);
}
youseries commented 6 years ago

最新的2.2.9-SNAPSHOT中已对算法进行了改进,请更新测试。