Skip to content

Commit 1a82e0c

Browse files
authored
Remove vestigial safe call in jvm Exceptions.kt (#4406)
1 parent 5f89004 commit 1a82e0c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

kotlinx-coroutines-core/jvm/src/Exceptions.kt

+2-5
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ internal actual class JobCancellationException public actual constructor(
6868
other === this ||
6969
other is JobCancellationException && other.message == message && other.job == job && other.cause == cause
7070

71-
override fun hashCode(): Int {
72-
// since job is transient it is indeed nullable after deserialization
73-
@Suppress("UNNECESSARY_SAFE_CALL")
74-
return (message!!.hashCode() * 31 + (job?.hashCode() ?: 0)) * 31 + (cause?.hashCode() ?: 0)
75-
}
71+
override fun hashCode(): Int =
72+
(message!!.hashCode() * 31 + job.hashCode()) * 31 + (cause?.hashCode() ?: 0)
7673
}

0 commit comments

Comments
 (0)