You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
$formatNumber: invalid picture patterns leak raw java.lang.IllegalArgumentException / miss validation (jsonata 2.2.1) #437
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.
Activity