Skip processing license data if there are no licenses specified

This commit is contained in:
nathan 2018-06-30 23:20:31 +02:00
parent 2726f97b6c
commit 2eeb5a5cb1
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,10 @@ class LicenseData(val name: String, val license: License) : Comparable<LicenseDa
* Sorts and remove dupes for the list of licenses.
*/
private fun sortAndClean(licenses: MutableList<LicenseData>) {
if (licenses.isEmpty()) {
return
}
// The FIRST one is always FIRST! (the rest are alphabetical)
val firstLicense = licenses[0]