Skip to content

Conversation

@filiphr
Copy link
Contributor

@filiphr filiphr commented Dec 12, 2025

Apart from adding support for Lambda Expressions this PR improves our testability for our JUEL expressions.

Copy tests for the Odysseus JUEL implementation from https://github.com/beckchr/juel
Copy Tomcat EL implementation tests from https://github.com/apache/tomcat/tree/97f157af6d750a644a3d1c26e2d6af0d59d7b553/test/org/apache/el

Implement some improvements for JUEL:

  • Support BigInteger literal - prior to this if a number larger than a long was used it would throw an exception during expression parsing
  • Support BigDecimal literal - prior to this if a number larger than a double would be used we would have an an infinite double, now it will use BigDecimal
  • Support using other quote escaping in string literal according to: https://jakarta.ee/specifications/expression-language/6.0/jakarta-expression-language-spec-6.0#literals.
    • \ must be escaped as \\
    • " must be escaped as \" when the string is enclosed with "
    • " may be escaped as \" when the string is enclosed with '
    • ' must be escaped as \' when the string is enclosed with '
    • ' may be escaped as \' when the string is enclosed with "
  • Adjust Odysseus TypeConverter to coerce null to non primitive types according to the JUEL spec (https://jakarta.ee/specifications/expression-language/6.0/jakarta-expression-language-spec-6.0#type-conversion).
    This leads to the changes in AstBinary, AstChoice and AstUnary to use a primitive boolean class to do the binding.
    It is safe to do since the other place where we coerce values is the BeanELResolver, in which we only call the coercion with a null value for primitives

Copy tests for the Odysseus JUEL implementation from https://github.com/beckchr/juel
Copy Tomcat EL implementation tests from https://github.com/apache/tomcat/tree/97f157af6d750a644a3d1c26e2d6af0d59d7b553/test/org/apache/el

Implement some improvements for JUEL:

* Support BigInteger literal - prior to this if a number larger than a long was used it would throw an exception during expression parsing
* Support BigDecimal literal - prior to this if a number larger than a double would be used we would have an an infinite double, now it will use BigDecimal
* Support using other quote escaping in string literal according to: https://jakarta.ee/specifications/expression-language/6.0/jakarta-expression-language-spec-6.0#literals.
  * `\` must be escaped as `\\`
  * `"` must be escaped as `\"` when the string is enclosed with `"`
  * `"` may be escaped as `\"` when the string is enclosed with `'`
  * `'` must be escaped as `\'` when the string is enclosed with `'`
  * `'` may be escaped as `\'` when the string is enclosed with `"`
* Adjust Odysseus TypeConverter to coerce null to non primitive types according to the JUEL spec (https://jakarta.ee/specifications/expression-language/6.0/jakarta-expression-language-spec-6.0#type-conversion).
  This leads to the changes in `AstBinary`, `AstChoice` and `AstUnary` to use a primitive boolean class to do the binding.
  It is safe to do since the other place where we coerce values is the BeanELResolver, in which we only call the coercion with a null value for primitives
…or Lambda Expressions

* Add support for getting length of arrays
* Add OptionalELResolver
* Add RecordELResolver
@filiphr filiphr merged commit 4d70fee into flowable:main Dec 15, 2025
2 checks passed
@filiphr filiphr deleted the juel-6 branch December 15, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant