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

2.2.7: JUEL's ${not x} fails with NPE if using custom typeConverter which returns null #89

Open
oxygenecore opened this issue May 13, 2015 · 0 comments

Comments

@oxygenecore
Copy link

If I override TypeConverterImpl in a manner to return null for input null values (to imitate apache's COERCE_TO_ZERO=false), ${not x} fails with NPE:

java.lang.NullPointerException
at de.odysseus.el.tree.impl.ast.AstUnary$3.apply(AstUnary.java:46)
at de.odysseus.el.tree.impl.ast.AstUnary$SimpleOperator.eval(AstUnary.java:32)
at de.odysseus.el.tree.impl.ast.AstUnary.eval(AstUnary.java:64)
at de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:51)
at de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:31)
at de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122)

Also, it seems that math binary operations also do not work with nulls properly - if one of parameters is null and other is not, code proceeds to an actual math block with implicit casts to a primitive number.

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

1 participant