Skip to content

Commit 5f2cb67

Browse files
committed
making comparator override non null as kotlin guards against this
1 parent 1ec99ee commit 5f2cb67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparator.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import org.matrix.android.sdk.api.auth.registration.Stage
2020

2121
class MatrixOrgRegistrationStagesComparator : Comparator<Stage> {
2222

23-
override fun compare(a: Stage?, b: Stage?): Int {
24-
return (a?.toPriority() ?: 0).compareTo(b?.toPriority() ?: 0)
23+
override fun compare(a: Stage, b: Stage): Int {
24+
return a.toPriority().compareTo(b.toPriority())
2525
}
2626

2727
private fun Stage.toPriority() = when (this) {

0 commit comments

Comments
 (0)