Open glassfishrobot opened 9 years ago
Reported by pdudits
kchung said: EL 3.0 was targeted for JDK 7, and as such knows nothing about Optional. However, Optional should be supported in the next release of EL, which is presumable targeted for JDK 8. It is also likely that the next release of EL, EL 3.1 will be a MR.
Was assigned to kchung
This issue was imported from java.net JIRA EL_SPEC-21
Expression language in Java EE 8 should bring special treatment for java.util.Optional, similar like it does for maps and lists:
When a base expression evaluates to instance of java.util.Optional, and the property name is not equal present, the result of the evaluation shall be equivalent to calling method map or flatMap on the optional:
The property present is evaluated by invoking the method isPresent() of the base object.
An example of implementation of this behaviour can be found in this ELResolver implementation.