forked from eclipse-jdt/eclipse.jdt.core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return a SortedSet in getAllJavaSourceVersionsSupportedByCompiler()
The list current returned by JavaCore.getAllJavaSourceVersionsSupportedByCompiler() is mainly/only used to either fetch the first or last element or test if a version-String is contained. Especially for the last operation a Set is a better choice regarding runtime. A SortedSet additionally also offers the methods first()/last(), which are semantically more expressive than calling List.get(0)/List.get(List.size()-1). Furthermore using a SortedSet would also better reflect the general semantic of the returned collection and element-access is usually not of interest.
- Loading branch information
1 parent
ed787f5
commit 64d4dbb
Showing
1 changed file
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters