Mon, 30 Oct 2023 10:06:22 +0100
replace Enum.values() with Enum.entries
--- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/Issues.kt Mon Oct 30 10:02:58 2023 +0100 +++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/Issues.kt Mon Oct 30 10:06:22 2023 +0100 @@ -115,7 +115,7 @@ val relationError: String?, commitRefs: List<CommitRef> ) : View() { - val relationTypes = RelationType.values() + val relationTypes = RelationType.entries val linkableIssues = projectIssues.filterNot { it.id == issue.id } val commitLinks: List<CommitLink> @@ -175,8 +175,8 @@ val versionsUpcoming: List<Version> val versionsRecent: List<Version> - val issueStatus = IssueStatus.values() - val issueCategory = IssueCategory.values() + val issueStatus = IssueStatus.entries + val issueCategory = IssueCategory.entries init { val recent = mutableListOf<Version>() @@ -198,9 +198,9 @@ class IssueFilter(http: HttpRequest) { - val issueStatus = IssueStatus.values() - val issueCategory = IssueCategory.values() - val sortCriteria = IssueSorter.Field.values().flatMap { listOf(IssueSorter.Criteria(it, true), IssueSorter.Criteria(it, false)) } + val issueStatus = IssueStatus.entries + val issueCategory = IssueCategory.entries + val sortCriteria = IssueSorter.Field.entries.flatMap { listOf(IssueSorter.Criteria(it, true), IssueSorter.Criteria(it, false)) } val flagIncludeDone = "f.0" val flagMine = "f.1" val flagBlocker = "f.2"
--- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/Versions.kt Mon Oct 30 10:02:58 2023 +0100 +++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/Versions.kt Mon Oct 30 10:06:22 2023 +0100 @@ -72,5 +72,5 @@ val projectInfo: ProjectInfo, val version: Version ) : EditView() { - val versionStatus = VersionStatus.values() + val versionStatus = VersionStatus.entries }