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

Calculator.conversion EmptyStackException #1984

Closed
jerhe opened this issue Nov 29, 2021 · 2 comments
Closed

Calculator.conversion EmptyStackException #1984

jerhe opened this issue Nov 29, 2021 · 2 comments

Comments

@jerhe
Copy link

jerhe commented Nov 29, 2021

版本情况

JDK版本: window jdk 1.8.0_291
hutool版本:5.7.16(请确保最新尝试是否还有问题)

问题描述(包括截图)

  1. 复现代码
    public static void main(String[] args) {
    System.out.println(Calculator.conversion("((1/1) / (1/1) -1) *100"));
    }
Exception in thread "main" java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:102)
	at cn.hutool.core.math.Calculator.prepare(Calculator.java:114)
	at cn.hutool.core.math.Calculator.calculate(Calculator.java:72)
	at cn.hutool.core.math.Calculator.conversion(Calculator.java:31)
	at net.jerhe.mydemo.hutool.HutoolDemo.main(HutoolDemo.java:12)

Process finished with exit code 1
  1. 堆栈信息

  2. 测试涉及到的文件(注意脱密)

比如报错的Excel文件,有问题的图片等。

@jerhe jerhe changed the title Calculator.conversion 解析堆溢出 Calculator.conversion EmptyStackException Nov 29, 2021
@looly
Copy link
Member

looly commented Nov 30, 2021

可能是个bug,稍后处理。

@looly
Copy link
Member

looly commented Dec 5, 2021

gitee上有人提供了一种解决方法的私聊,我先关闭这个issue,保留那个解决方案的issue,稍后处理:https://gitee.com/dromara/hutool/issues/I4KONB

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