Mikael Ståldal
01/13/2023, 10:36 AMStatus.UNKNOWN_HOST and Status.CONNECTION_REFUSED are equal, is that intentional?
Try this:
fun main() {
println(Status.SERVICE_UNAVAILABLE == Status.UNKNOWN_HOST)
println(Status.UNKNOWN_HOST == Status.CONNECTION_REFUSED)
}
Gives:
false
true
The reason is that they have the same code (503) and both are clientGenerated.dave
01/13/2023, 10:42 AMMikael Ståldal
01/13/2023, 10:43 AMMikael Ståldal
01/13/2023, 10:44 AMequals method should be able to distinguish between them somehow anyway?dave
01/13/2023, 10:45 AMdave
01/13/2023, 10:46 AMMikael Ståldal
01/13/2023, 10:46 AMhashCode method does not take clientGenerated into account (as equals does), making it inconsistent with equals.dave
01/13/2023, 10:47 AMMikael Ståldal
01/13/2023, 10:49 AMMikael Ståldal
01/13/2023, 10:49 AMhashCode thing.)dave
01/13/2023, 10:50 AMdave
01/13/2023, 10:50 AMMikael Ståldal
01/13/2023, 10:51 AMMikael Ståldal
01/13/2023, 10:55 AMhashCode thing also: https://github.com/http4k/http4k/issues/846James Richardson
01/14/2023, 9:01 PM