Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Dec 2, 2024
1 parent a449eb4 commit 01a74a8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ public String format() {
.reduce((first, last) -> last)
.orElse(null);

return path.stream().map(this::toName).filter(Objects::nonNull).collect(Collectors.joining()).trim();
return path.stream()
.map(this::toName)
.filter(Objects::nonNull)
.collect(Collectors.joining())
.trim();
}

private List<TestIdentifier> getPath(TestPlan testPlan, TestIdentifier identifier) {
Expand All @@ -327,7 +331,7 @@ private List<TestIdentifier> getPath(TestPlan testPlan, TestIdentifier identifie
do {
// If there is only one segment, do not filter it out even
// if the source is not present, since we need to show something
boolean isOnlySegment = (result.isEmpty() && !testPlan.getParent(identifier).isPresent());
boolean isOnlySegment = (result.isEmpty());
if (identifier.getSource().isPresent() || isOnlySegment) {
result.add(identifier);
}
Expand Down

0 comments on commit 01a74a8

Please sign in to comment.