Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

仿真测试double类型的字段,两个字段做减法运算报错 用去掉空格函数正常运行 #38

Closed
mataoshishen opened this issue Jan 2, 2018 · 4 comments

Comments

@mataoshishen
Copy link

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

  • 当前使用的URule的具体版本号:

2.13

  • 遇到的问题详细描述:

仿真测试double类型的字段,两个字段做减法运算报错 用去掉空格函数正常运行

  • 涉及到的异常信息(完整异常信息):

  • 相关截图:

image
image

@youseries
Copy link
Owner

完整异常发上来!

@mataoshishen
Copy link
Author

就是多空格,程序里面没有去空格

Caused by: java.lang.NumberFormatException: Can not convert 20.0 to number.
at com.bstek.urule.Utils.toBigDecimal(Utils.java:168)
at com.bstek.urule.runtime.ElCalculator.calculate(ElCalculator.java:192)
at com.bstek.urule.runtime.ElCalculator.calculate(ElCalculator.java:90)
at com.bstek.urule.runtime.ElCalculator.eval(ElCalculator.java:32)
at com.bstek.urule.runtime.rete.ContextImpl.parseExpression(ContextImpl.java:66)
at com.bstek.urule.runtime.rete.ValueCompute.compute(ValueCompute.java:102)
at com.bstek.urule.runtime.rete.ValueCompute.complexValueCompute(ValueCompute.java:56)
at com.bstek.urule.action.VariableAssignAction.execute(VariableAssignAction.java:55)
at com.bstek.urule.runtime.agenda.ActivationImpl.execute(ActivationImpl.java:99)
at com.bstek.urule.runtime.agenda.ActivationRuleBox.execute(ActivationRuleBox.java:47)
at com.bstek.urule.runtime.agenda.Agenda.execute(Agenda.java:53)
at com.bstek.urule.runtime.KnowledgeSessionImpl.execute(KnowledgeSessionImpl.java:207)
at com.bstek.urule.runtime.KnowledgeSessionImpl.fireRules(KnowledgeSessionImpl.java:137)
at com.bstek.urule.console.servlet.respackage.PackageServletHandler.doTest(PackageServletHandler.java:685)
... 67 more

@youseries
Copy link
Owner

最新版SNAPSHOT中已做去空格处理,谢谢。

@mataoshishen
Copy link
Author

什么时间发布呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants