Skip to content

Commit

Permalink
Issue #2491 - replace Java Streams based logic with conventional loop
Browse files Browse the repository at this point in the history
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
  • Loading branch information
JohnTimm committed Jun 9, 2021
1 parent 276758e commit edfdaa5
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1143,10 +1143,14 @@ public Collection<FHIRPathNode> visitMemberInvocation(FHIRPathParser.MemberInvoc
}
}

Collection<FHIRPathNode> result = currentContext.stream()
.flatMap(node -> node.children().stream())
.filter(node -> identifier.equals(node.name()))
.collect(Collectors.toList());
List<FHIRPathNode> result = new ArrayList<>();
for (FHIRPathNode node : currentContext) {
for (FHIRPathNode child : node.children()) {
if (identifier.equals(child.name())) {
result.add(child);
}
}
}

indentLevel--;

Expand Down

0 comments on commit edfdaa5

Please sign in to comment.