jakartaee / expression-language

Jakarta Expression Language
https://eclipse.org/ee4j/el
Other
60 stars 49 forks source link

Fix #176 - Add support for java.util.Optional #203

Closed markt-asf closed 11 months ago

markt-asf commented 1 year ago

Support is implemented via a new resolver : OptionalELResolver

The resolver is not included in the default ELResolvers. It must be explicitly added by the user if they wish to enable this functionality.

Writing meaningful unit tests for this new ELResolver is not possible with an EL implementation. The rsolver was developed using the Tomcat project including some unit tests: https://github.com/apache/tomcat/blob/main/test/jakarta/el/TestOptionalELResolver.java https://github.com/apache/tomcat/blob/main/test/jakarta/el/TestOptionalELResolverInJsp.java

markt-asf commented 1 year ago

I intend to leave this PR open for at least a week for feedback before merging.