Skip to content

Commit

Permalink
refactor: Remove some unnecessary uses of sorted sets
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed May 27, 2024
1 parent db8c595 commit 41b450b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/licenses/LicenseClassifications.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ data class LicenseClassifications(
/** A property allowing convenient access to the names of all categories defined in alphabetical order. */
@get:JsonIgnore
val categoryNames: Set<String> by lazy {
categories.mapTo(sortedSetOf()) { it.name }
categories.mapTo(mutableSetOf()) { it.name }
}

init {
Expand Down
2 changes: 1 addition & 1 deletion model/src/test/kotlin/DependencyTreeNavigatorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class DependencyTreeNavigatorTest : AbstractDependencyNavigatorTest() {

"dependencyTreeDepth" should {
"return 0 if the scope does not contain any package" {
val scope = Scope(name = "test", dependencies = sortedSetOf())
val scope = Scope(name = "test", dependencies = emptySet())
val project = Project.EMPTY.copy(scopeDependencies = setOf(scope))

navigator.dependencyTreeDepth(project, scope.name) shouldBe 0
Expand Down
2 changes: 1 addition & 1 deletion model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ private fun createResolver(
archiver: FileArchiver = FileArchiver.createDefault()
) = LicenseInfoResolver(
provider = SimpleLicenseInfoProvider(data),
copyrightGarbage = CopyrightGarbage(copyrightGarbage.toSortedSet()),
copyrightGarbage = CopyrightGarbage(copyrightGarbage),
addAuthorsToCopyrights = addAuthorsToCopyrights,
archiver = archiver
)
Expand Down

0 comments on commit 41b450b

Please sign in to comment.