Change Port to disallow a value of 0

This commit is contained in:
cketti 2023-06-14 12:47:20 +02:00
parent eb68441379
commit a0725d6726

View file

@ -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" }
}
}