Skip to content

Commit

Permalink
shortcut the test (#1269)
Browse files Browse the repository at this point in the history
Co-authored-by: wcekan <wcekan@verizonmedia.com>
  • Loading branch information
wcekan and wcekan authored Apr 17, 2020
1 parent f492cec commit d2fefd4
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ public Boolean visitPredicate(FilterPredicate filterPredicate) {

@Override
public Boolean visitAndExpression(AndFilterExpression expression) {
Boolean left = expression.getLeft().accept(this);
Boolean right = expression.getRight().accept(this);
return (left || right);
FilterExpression left = expression.getLeft();
FilterExpression right = expression.getRight();
// is either computed?
return (left.accept(this) || right.accept(this));
}

@Override
public Boolean visitOrExpression(OrFilterExpression expression) {
Boolean left = expression.getLeft().accept(this);
Boolean right = expression.getRight().accept(this);
return (left || right);
FilterExpression left = expression.getLeft();
FilterExpression right = expression.getRight();
// is either computed?
return (left.accept(this) || right.accept(this));
}

@Override
Expand Down

0 comments on commit d2fefd4

Please sign in to comment.