Skip to content
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

Checking null in CatnapEqualityExpression.isEqual method for the json nodes missing elements. #13

Open
Chinna-SHS opened this issue Sep 20, 2017 · 2 comments
Assignees
Labels

Comments

@Chinna-SHS
Copy link

Chinna-SHS commented Sep 20, 2017

hi Greg,
In the following response scenario if the filter key is not available in some node then I am getting null pointer exception. Could you please check this below?

  1. Let's say given filter is like below
    ?fields=items[key=1]

  2. Let's say response from service is like below. "key" element is missing in third node. We are trying to filter with "key=1". In this case , line number 80 is throwing null pointer exception as there is no key and value is null. We should return false in that case. What do you think?

{"items": [
{
"key": "1",
"value": "v1"
},
{
"key": "2",
"value": "v2"
},
{"value": "v3"}
]}

@gregwhitaker gregwhitaker self-assigned this Sep 24, 2017
@gregwhitaker
Copy link
Owner

I've got a fix for this that I can push soon.

@Chinna-SHS
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants