jakartaee / expression-language

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

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

Closed markt-asf closed 1 year 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.

Meaningful unit tests for this resolver are not possible without an EL implementation. This new ELResolver was developed in the Tomcat project which does have some unit tests to confirm that the behaviour is as expected: 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

Closing as linked to wrong issue due to comment typo.