Skip to content

Commit c52636b

Browse files
committed
refactor(CopyrightGarbage): Avoid using a SortedSet in memory
See #6235 for context. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 390b97f commit c52636b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

model/src/main/kotlin/config/CopyrightGarbage.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020
package org.ossreviewtoolkit.model.config
2121

22-
import java.util.SortedSet
22+
import com.fasterxml.jackson.databind.annotation.JsonSerialize
23+
24+
import org.ossreviewtoolkit.utils.common.StringSortedSetConverter
2325

2426
/**
2527
* A class that defines which Copyright statements are to be considered as garbage instead of real findings.
@@ -28,7 +30,8 @@ data class CopyrightGarbage(
2830
/**
2931
* A set of literal strings that identify garbage Copyright findings.
3032
*/
31-
val items: SortedSet<String> = sortedSetOf()
33+
@JsonSerialize(converter = StringSortedSetConverter::class)
34+
val items: Set<String> = emptySet()
3235
)
3336

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

0 commit comments

Comments
 (0)