Skip to content

Commit

Permalink
chore: Use singleOrNull to simplfiy code
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Sep 9, 2024
1 parent 54a2e4e commit de66c45
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private fun getLinkageForDependency(

relationId == dependency.spdxId && relation.spdxElementId == dependant
}
}.takeUnless { it.isEmpty() }?.single() ?: PackageLinkage.DYNAMIC
}.singleOrNull() ?: PackageLinkage.DYNAMIC

/**
* Return true if the [relation] as defined in [relationships] describes an [SPDX_LINKAGE_RELATIONSHIPS] in the
Expand Down

0 comments on commit de66c45

Please sign in to comment.