Change Port
to disallow a value of 0
This commit is contained in:
parent
eb68441379
commit
a0725d6726
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ package app.k9mail.core.common.net
|
|||
@JvmInline
|
||||
value class Port(val value: Int) {
|
||||
init {
|
||||
require(value in 0..65535) { "Not a valid port number: $value" }
|
||||
require(value in 1..65535) { "Not a valid port number: $value" }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue