Skip to content

Commit 3af0a6e

Browse files
travkin79rubenporras
authored andcommitted
Minor code improvements
1 parent fc922c7 commit 3af0a6e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import java.util.Comparator;
1616
import java.util.List;
1717
import java.util.Optional;
18-
import java.util.stream.Collectors;
1918

2019
import org.eclipse.core.resources.IMarker;
2120
import org.eclipse.jdt.annotation.Nullable;
@@ -63,7 +62,7 @@ public class SymbolIconProvider {
6362

6463
private static final List<SymbolTag> VISIBILITY_PRECEDENCE = List.of(
6564
SymbolTag.Public, SymbolTag.Protected, SymbolTag.Package,
66-
SymbolTag.Internal, SymbolTag.File, SymbolTag.Private);;
65+
SymbolTag.Internal, SymbolTag.File, SymbolTag.Private);
6766

6867
/**
6968
* Returns a list of visibility {@link SymbolTag}s with decreasing precedence.
@@ -107,7 +106,7 @@ protected List<SymbolTag> getAdditionalTagsPrecedence() {
107106
protected final Optional<SymbolTag> getHighestPrecedenceVisibilitySymbolTag(List<SymbolTag> symbolTags) {
108107
final var precedenceList = getVisibilityPrecedence();
109108
return symbolTags.stream()
110-
.filter(tag -> precedenceList.contains(tag))
109+
.filter(precedenceList::contains)
111110
.min(Comparator.comparing(precedenceList::indexOf));
112111
}
113112

@@ -123,9 +122,9 @@ protected final Optional<SymbolTag> getHighestPrecedenceVisibilitySymbolTag(List
123122
protected final List<SymbolTag> getAdditionalSymbolTagsSorted(List<SymbolTag> symbolTags) {
124123
final var precedenceList = getAdditionalTagsPrecedence();
125124
return symbolTags.stream()
126-
.filter(tag -> precedenceList.contains(tag))
125+
.filter(precedenceList::contains)
127126
.sorted(Comparator.comparing(precedenceList::indexOf))
128-
.collect(Collectors.toList());
127+
.toList();
129128
}
130129

131130
private @Nullable ImageDescriptor getOverlayForVisibility(List<SymbolTag> symbolTags) {

0 commit comments

Comments
 (0)