Skip to content

Commit

Permalink
fix(analyzer): Serialize sharedPackages ordered by their id
Browse files Browse the repository at this point in the history
Make the serialization more deterministic.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed May 17, 2024
1 parent e074893 commit 4bd380b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions analyzer/src/main/kotlin/PackageManagerResult.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

package org.ossreviewtoolkit.analyzer

import com.fasterxml.jackson.databind.annotation.JsonSerialize

import java.io.File

import org.ossreviewtoolkit.model.DependencyGraph
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.ProjectAnalyzerResult
import org.ossreviewtoolkit.model.utils.PackageSortedSetConverter

/**
* A data class representing the result of the execution of a [PackageManager]. An instance contains the single
Expand All @@ -48,5 +51,6 @@ data class PackageManagerResult(
* produce a shared [DependencyGraph] typically do not collect packages on a project-level, but globally. Such
* packages can be stored in this property.
*/
@JsonSerialize(converter = PackageSortedSetConverter::class)
val sharedPackages: Set<Package> = emptySet()
)

0 comments on commit 4bd380b

Please sign in to comment.