diff --git a/json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java b/json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java index 7506358a..98e2d1c4 100644 --- a/json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java +++ b/json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java @@ -805,9 +805,9 @@ public abstract class ValueNode { } public ValueNode evaluate(Predicate.PredicateContext ctx) { - Configuration c = Configuration.builder().jsonProvider(ctx.configuration().jsonProvider()).options(Option.REQUIRE_PROPERTIES).build(); if (isExistsCheck()) { try { + Configuration c = Configuration.builder().jsonProvider(ctx.configuration().jsonProvider()).options(Option.REQUIRE_PROPERTIES).build(); Object result = path.evaluate(ctx.item(), ctx.root(), c).getValue(false); return result == JsonProvider.UNDEFINED ? ValueNode.FALSE : ValueNode.TRUE; } catch (PathNotFoundException e) { @@ -842,4 +842,4 @@ public abstract class ValueNode { } -} \ No newline at end of file +}