Compare commits
1 commit
a94867bb1b
...
6986ab5a1c
Author | SHA1 | Date | |
---|---|---|---|
6986ab5a1c |
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ data class ActivationCode(
|
|||
companion object {
|
||||
fun fromString(input: String): ActivationCode {
|
||||
check(input.startsWith("LPA:", ignoreCase = true)) { "Invalid activation code format" }
|
||||
val components = input.drop(4).split('$').map(String::trim).map { it.ifBlank { null } }
|
||||
val components = input.drop(4).split('$').map { it.trim().ifEmpty { null } }
|
||||
check(components.size >= 2) { "Invalid activation code format" }
|
||||
check(components[0] == "1") { "Invalid activation code version" }
|
||||
return ActivationCode(
|
||||
|
|
Loading…
Add table
Reference in a new issue