EL evaluates null Number expression as zero

Solution Unverified - Updated -

Issue

Null EL expression (e.g. #{nullNumber}) is evaluated as zero instead of null when it is assigned to non-primitive Number type.
The system property org.apache.el.parser.COERCE_TO_ZERO has no effect.

Environment

  • JBoss EAP 6
  • Expression Language (EL) 2.1 / 2.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content