From: Gabriel <groldan@ax...> - 2005-10-18 17:49:50
I have a question about filter semantics.
I didn't found test cases for Filter where its Expression components evaluates
to null, so I'm wondering what a filter should do if while evaluating
containment one of its expressions evaluates to null?
For example, if a comparison filter is compound of an attribute expression and
a literal, and the attribute expression evaluates to null, the filters
contains() method results in a NullPointerException.
By the other hand, we have NullFilter, but LogicFilters aren't making short
circuit evaluation, so a filtes like (ATT IS NOT NULL) AND (ATT > 10) leads
to a nullpointer exception anyways.
My inclination is to let them fail and implement short circuit evaluation on
The other option is to contemplate that expressions may evaluate to null, and
manage it on each filter type implementation.
Am I missing something?
Get latest updates about Open Source Projects, Conferences and News.