Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fun LicenseExpression.weight(): Int =
is JustLicense -> 1
is OrLaterLicense -> 2
is WithException -> license.weight() + 1
is ConjunctionLicenseExpression -> licenses.map { it.weight() + 1 }.max() ?: 1
is DisjunctionLicenseExpression -> licenses.map { it.weight() + 1 }.max() ?: 1
is ConjunctionLicenseExpression -> licenses.map { it.weight() + 1 }.maxOrNull() ?: 1
is DisjunctionLicenseExpression -> licenses.map { it.weight() + 1 }.maxOrNull() ?: 1
else -> TODO("Unexpected expression: ${this::class.simpleName}: $this")
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class Apache2LicenseInterpreter {
return when (e) {
is DisjunctionLicenseExpression ->
// A or X => A
e.unordered.map { eval(it) }.min()
e.unordered.map { eval(it) }.minOrNull()
is ConjunctionLicenseExpression ->
e.unordered.map { eval(it) }.max()
e.unordered.map { eval(it) }.maxOrNull()
else -> null
} ?: AsfLicenseCategory.UNKNOWN
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ class StageVoteReleasePlugin @Inject constructor(private val instantiator: Insta
Pair(listOf(), mapOf())
}

val svnStagingRevision = stagedFiles.map { it.commit.revision }.max() ?: 0
val svnStagingRevision = stagedFiles.map { it.commit.revision }.maxOrNull() ?: 0

val releaseParams = ReleaseParams(
tlp = releaseExt.tlp.get(),
Expand Down
Loading