ApsMode enum - refactor of fromString

This commit is contained in:
piotrek 2022-12-12 00:01:10 +01:00
parent 6205c9b893
commit e8a5dc2627

View file

@ -8,6 +8,6 @@ enum class ApsMode() {
companion object { companion object {
fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED) } fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED.name) } ?: UNDEFINED
} }
} }