spel2js icon indicating copy to clipboard operation
spel2js copied to clipboard

null expression not evaluating

Open vishalkumarnl opened this issue 5 years ago • 2 comments

suppose employe.id = null and expression = "employe.id ? true : false" if I am trying to evaluate the above expression using SpelExpressionEvaluator.compile(expression) function call. It returns NullPointer exception which was not happening in 0.2.5

vishalkumarnl avatar Nov 27 '19 07:11 vishalkumarnl

Hmm, let me take a look and get back to you. Can you provide a bit more code including the context and locals?

benmarch avatar Dec 02 '19 18:12 benmarch

I have come to the same issue. Any possible workaround or solution is appreciated.

Here is another simple example throwing the exception

var spel2js = require("[email protected]") // replace this 0.2.6 and it works var r = spel2js.SpelExpressionEvaluator.compile("X == 1") var row = { X : null, Y: 1.0 } r.eval(row)

Raccoonwao avatar Jan 07 '20 03:01 Raccoonwao