New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_jsonpath fails on missing json keys #232

Closed
kroepke opened this Issue Dec 7, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@kroepke
Member

kroepke commented Dec 7, 2017

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.

@kroepke kroepke added the bug label Dec 7, 2017

@kroepke kroepke added this to the 2.4.0 milestone Dec 7, 2017

@kroepke kroepke self-assigned this Dec 7, 2017

kroepke added a commit that referenced this issue Dec 7, 2017

@wafflebot wafflebot bot added the in progress label Dec 7, 2017

@joschi joschi closed this in #233 Dec 7, 2017

joschi added a commit that referenced this issue Dec 7, 2017

@wafflebot wafflebot bot removed the in progress label Dec 7, 2017

joschi added 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