select_jsonpath fails on missing json keys #232
Closed
Comments
kroepke
added a commit
that referenced
this issue
Dec 7, 2017
joschi
added a commit
that referenced
this issue
Dec 7, 2017
joschi
pushed a commit
that referenced
this issue
Dec 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using
select_jsonpath
to extract one or more values from a JSON object, the function does not handle missing values gracefully and will fail the entire rule.The test introduced in #209 unfortunately looks like it tests for the correct behavior, but the test harness is not exactly the same as the production code.
Thus we need to filter out null values in the function itself. The NPE is an unfortunate sideeffect of the Java streams map collector, rather than the overall "null-ness" of a value in a map.
The text was updated successfully, but these errors were encountered: