Surfaced while comparing JSONata4Java against the jsonata-js 2.2.1 test corpus during the Jackson 3 migration (#430 / PR #431). These are pre-existing functional-compatibility gaps vs the reference implementation (try.jsonata.org 2.2.1), not regressions introduced by the migration.
$formatNumber mishandles several invalid/edge picture strings — either leaking a raw java.lang.IllegalArgumentException (rather than a JSONata EvaluateException) or producing output the reference rejects.
| Expression | JSONata4Java | jsonata.org 2.2.1 |
|---|
$formatNumber(42, "%%") | raw java.lang.IllegalArgumentException: Too many percent/per mille characters | error (well-formed JSONata error) |
$formatNumber(42, "‰‰") | raw java.lang.IllegalArgumentException: Too many percent/per mille characters | error |
$formatNumber(42, "%‰") | raw java.lang.IllegalArgumentException: Too many percent/per mille characters | error |
$formatNumber(42, "---") | returns "---42" | error (invalid picture) |
Expected: these should raise a proper JSONata EvaluateException (D3080-class picture-string error) rather than leaking an internal Java exception or silently accepting an invalid picture.
Reference: jsonata-js 2.2.1.
Surfaced while comparing JSONata4Java against the jsonata-js 2.2.1 test corpus during the Jackson 3 migration (#430 / PR #431). These are pre-existing functional-compatibility gaps vs the reference implementation (try.jsonata.org 2.2.1), not regressions introduced by the migration.
$formatNumbermishandles several invalid/edge picture strings — either leaking a rawjava.lang.IllegalArgumentException(rather than a JSONataEvaluateException) or producing output the reference rejects.$formatNumber(42, "%%")java.lang.IllegalArgumentException: Too many percent/per mille characters$formatNumber(42, "‰‰")java.lang.IllegalArgumentException: Too many percent/per mille characters$formatNumber(42, "%‰")java.lang.IllegalArgumentException: Too many percent/per mille characters$formatNumber(42, "---")"---42"Expected: these should raise a proper JSONata
EvaluateException(D3080-class picture-string error) rather than leaking an internal Java exception or silently accepting an invalid picture.Reference: jsonata-js 2.2.1.