javaee / el-spec

Expression Language 3.0 specification, JSR341
Other
20 stars 11 forks source link

Property support for Optional<T> #21

Open glassfishrobot opened 9 years ago

glassfishrobot commented 9 years ago

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.

glassfishrobot commented 9 years ago

Reported by pdudits

glassfishrobot commented 9 years ago

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.

glassfishrobot commented 9 years ago

Was assigned to kchung

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EL_SPEC-21