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

.build() hangs on invalid expression #90

Open
bloc97 opened this issue Jan 22, 2018 · 2 comments
Open

.build() hangs on invalid expression #90

bloc97 opened this issue Jan 22, 2018 · 2 comments

Comments

@bloc97
Copy link

bloc97 commented Jan 22, 2018

I'm currently using 0.4.8 and this will hang and use CPU resources forever.

try {
    Expression e = new ExpressionBuilder("x+cos9y)").variables("x","y").build();
    System.out.println("Built");
} catch (Exception e) {
}

One CPU core keeps being used and "Built" is never printed on the console.
The application also never terminates.

@subramaniant
Copy link

Hi,

can you try like below.. ("x+cos9y**)**").. may issue with ')' ..
double result = new ExpressionBuilder("x+cos9y")
.variables("x","y")
.build()
.setVariable("x", 0.5d)
.setVariable("y", 0.25d)
.evaluate();
System.out.println(result);

@subramaniant
Copy link

("x+cos9y)").. may issue with ')' ..

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

No branches or pull requests

2 participants