Skip to content

Commit

Permalink
Avoid allocation for descriptions without children
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Dec 30, 2020
1 parent 59727ee commit 8169f92
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void applyFiltersAndCreateDescendants(RunnerTestDescriptor runnerTestDescriptor)
}

private void addChildrenRecursively(VintageTestDescriptor parent) {
if (parent.getDescription().isTest()) {
return;
}
List<Description> children = parent.getDescription().getChildren();
// Use LinkedHashMap to preserve order, ArrayList for fast access by index
Map<String, List<Description>> childrenByUniqueId = children.stream().collect(
Expand Down

0 comments on commit 8169f92

Please sign in to comment.