Skip to content

Commit 9c1bf3b

Browse files
committed
use stream()
1 parent 758a7d4 commit 9c1bf3b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/Annotation.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ public Set<String> getRevisions() {
9494

9595
@TestOnly
9696
Set<String> getAuthors() {
97-
Set<String> ret = new HashSet<>();
98-
for (Line ln : this.lines) {
99-
ret.add(ln.author);
100-
}
101-
return ret;
97+
return lines.stream().map(ln -> ln.author).collect(Collectors.toSet());
10298
}
10399

104100
/**

0 commit comments

Comments
 (0)