Browse Source

Don't eval to much in && and || filters.

pull/56/head
Kalle Stenflo 10 years ago
parent
commit
5315b7d47f
  1. 6
      json-path/src/main/java/com/jayway/jsonpath/Filter.java

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

@ -67,8 +67,7 @@ public class Filter implements Predicate {
@Override
public boolean apply(PredicateContext ctx) {
boolean a = Filter.this.apply(ctx);
boolean b = other.apply(ctx);
return a || b;
return a || other.apply(ctx);
}
};
}
@ -78,8 +77,7 @@ public class Filter implements Predicate {
@Override
public boolean apply(PredicateContext ctx) {
boolean a = Filter.this.apply(ctx);
boolean b = other.apply(ctx);
return a && b;
return a && other.apply(ctx);
}
};
}

Loading…
Cancel
Save