Skip to content

Commit

Permalink
Use more functional style to improve code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo authored and hashhar committed Nov 17, 2021
1 parent 55f9c7a commit 1562713
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,7 @@ public Scope process(Node node, Optional<Scope> scope)
{
Scope returnScope = super.process(node, scope);
checkState(returnScope.getOuterQueryParent().equals(outerQueryScope), "result scope should have outer query scope equal with parameter outer query scope");
if (scope.isPresent()) {
checkState(hasScopeAsLocalParent(returnScope, scope.get()), "return scope should have context scope as one of its ancestors");
}
scope.ifPresent(value -> checkState(hasScopeAsLocalParent(returnScope, value), "return scope should have context scope as one of its ancestors"));
return returnScope;
}

Expand Down
Loading

0 comments on commit 1562713

Please sign in to comment.