Browse Source

Fix #857 DCollecting all values for given key in object array returns empty Collection

pull/859/head
skwqy 2 years ago
parent
commit
bbd2bda832
  1. 6
      json-path/src/main/java/com/jayway/jsonpath/internal/path/PathToken.java

6
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathToken.java

@ -86,7 +86,8 @@ public abstract class PathToken {
ctx.getRoot().getTail().prev().getPathFragment().equals("[*]")){
ctx.addResult(evalPath, pathRef, propertyVal);
}
} else {
}
else {
next().evaluate(evalPath, pathRef, propertyVal, ctx);
}
} else {
@ -214,8 +215,7 @@ public abstract class PathToken {
return super.equals(obj);
}
public void invoke(PathFunction pathFunction, String currentPath, PathRef parent, Object model,
EvaluationContextImpl ctx) {
public void invoke(PathFunction pathFunction, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) {
ctx.addResult(currentPath, parent, pathFunction.invoke(currentPath, parent, model, ctx, null));
}

Loading…
Cancel
Save