Skip to content

Commit

Permalink
refactor(CopyrightGarbage): Avoid using a SortedSet
Browse files Browse the repository at this point in the history
See #6235 for context. Here, the use of `StringSortedSetConverter` is
not required, as `ImportCopyrightGarbageCommand` is the only place that
serializes the class, and that uses its own `Collator` for custom
sorting.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Mar 7, 2023
1 parent 390b97f commit f297625
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions model/src/main/kotlin/config/CopyrightGarbage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@

package org.ossreviewtoolkit.model.config

import java.util.SortedSet

/**
* A class that defines which Copyright statements are to be considered as garbage instead of real findings.
*/
data class CopyrightGarbage(
/**
* A set of literal strings that identify garbage Copyright findings.
*/
val items: SortedSet<String> = sortedSetOf()
val items: Set<String> = emptySet()
)

fun CopyrightGarbage?.orEmpty(): CopyrightGarbage = this ?: CopyrightGarbage()

0 comments on commit f297625

Please sign in to comment.