Skip to content

Conversation

@5Orange
Copy link

@5Orange 5Orange commented Mar 26, 2023

the Option.SUPRESS-EXCEPTION is not working in this case : #908
var node = objectMapper.readTree("{"test" : null}");

JsonPath.using(Configuration.builder()
    .options(Option.SUPPRESS_EXCEPTIONS).build())
    .parse(node.toString())
    .read("$.test[?(@ != null)]");

5Orange added 4 commits March 26, 2023 10:39
the Option.SUPRESS-EXCEPTION is not working in this case   :
var node = objectMapper.readTree("{\"test\" :  null}");

    JsonPath.using(Configuration.builder()
        .options(Option.SUPPRESS_EXCEPTIONS).build())
        .parse(node.toString())
        .read("$.test[?(@ != null)]");
@5Orange
Copy link
Author

5Orange commented Mar 29, 2023

@kallestenflo could you please take a look ? #908

@lordshelbyss
Copy link

With 2.6.0 versions and below, this would return an empty list.
But now it throws the above exception. Will the fix entail that an empty list be returned along with exceptions being supressed ?

@5Orange
Copy link
Author

5Orange commented May 12, 2023

With 2.6.0 versions and below, this would return an empty list.
But now it throws the above exception. Will the fix entail that an empty list be returned along with exceptions being supressed ?

That fix same as the 2.6 version. It will return an empty list when “suppress exception” is true. Let me know what I need to update if I'm missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants