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.
Exception in thread "main" java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102)
at java.util.Stack.pop(Stack.java:84)
at com.bstek.ureport.utils.ElCompute.doCalculate(ElCompute.java:156)
at com.bstek.ureport.utils.ElCompute.init(ElCompute.java:83)
at com.bstek.ureport.utils.ElCompute.doCompute(ElCompute.java:59)
运行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);
}
为了您的问题能得到及时准确解答,请认真填写下面各个选项,感谢您的配合。
当前使用的UReport的具体版本号:
com.bstek.ureport.utils.ElCompute 类 提交版本号 5936fb5 提交时间:2018.7.4 提交注释:重写表达式计算算法,大幅提高表达式计算性能
遇到的问题描述:
单元格内配置表达式: F2!=null?'/img/'+ G2 +'.png':'/img/正常.png'
运行的时候F2 不为空,G2=风险高
涉及到的异常信息(完整异常信息):
Exception in thread "main" java.util.EmptyStackException at java.util.Stack.peek(Stack.java:102) at java.util.Stack.pop(Stack.java:84) at com.bstek.ureport.utils.ElCompute.doCalculate(ElCompute.java:156) at com.bstek.ureport.utils.ElCompute.init(ElCompute.java:83) at com.bstek.ureport.utils.ElCompute.doCompute(ElCompute.java:59)
运行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); }