Skip to content

Commit

Permalink
[bugfix] check before optimizing innerExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
marmoure committed Apr 24, 2023
1 parent 3892ebe commit 5c383b5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public Pragma rewriteLocationStep(final LocationStep locationStep) throws XPathE
}

Expression innerExpr = pred.getExpression(0);
if(innerExpr instanceof InternalFunctionCall && ((InternalFunctionCall) innerExpr).getFunction() instanceof Lookup ) {
// innerExpr was already optimized
continue;
}

List<LocationStep> steps = getStepsToOptimize(innerExpr);
if (steps == null || steps.isEmpty()) {
// no optimizable steps found
Expand Down

0 comments on commit 5c383b5

Please sign in to comment.