Search code examples
el

Equals in EL: what if the first operand is null?


If I have an EL expression like this one:

#{a == b}

what happens if a is null? There is some difference between different versions of EL?

Where can I found an official specs that explain that?


Solution

  • From official EL specs 2.1 section 1.8.2:

    If A is null or B is null return false

    There are special cases for BigDecimal and BigInteger. I don't know for the other specs.