#17 getValueAsObject always return null after an error

Main (11)

The JEP object has been created correctly and the
parseExpression() method has parsed the expression
succesfully. I then use the getValueAsObject() method
to evaluate the expression multiple times with
different variable values. I have a custom function and
this works ok. The expressions get evaluated correctly
a couple of times, but then a null value is passed and
my custom function throws a NullPointerException. After
that the getValueAsObject() always return null, even if
the variable is set to non-null values. If I skip the
evaluation of null values the expression is correctly
evaluated every time.

I think the simplest solution would be a way to clear
the error list before calling getValueAsObject(). I
looked at the code and I think that maybe checking the
error list is not needed. The expression should always
be evaluated unless the expression couldn't be parsed
and the topNode variable should be null in case the
expression couldn't be parsed?


  • Nathan Funk

    Nathan Funk - 2007-04-20

    Logged In: YES
    Originator: NO

    Thanks for this bug report! Though many users will not encounter this issue it is definitely a bug.

    The bug has been fixed and will be patched in future releases.

  • Nathan Funk

    Nathan Funk - 2007-04-20
    • milestone: --> 2.4.0
    • assigned_to: nobody --> nathanfunk
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks