IJPL-158517 fix NPE in coroutineDumper

GitOrigin-RevId: 34b97b0d45a90d8fbdab47e6bfe417f389057ef0
This commit is contained in:
Vadim Salavatov
2024-07-29 12:49:56 +02:00
committed by intellij-monorepo-bot
parent 10afd2fead
commit 6e41cff151

View File

@@ -267,7 +267,7 @@ private fun JobTree.toRepresentation(stripTrace: Boolean): JobRepresentationTree
job is CoroutineScope -> job.coroutineContext
debugInfo !== null -> debugInfo.context
else -> EmptyCoroutineContext
}
} ?: EmptyCoroutineContext // shouldn't be necessary but see IJPL-158517
val name = if (job is AbstractCoroutine<*> && DEBUG) {
// in DEBUG the name is displayed as part of `job.toString()` for AbstractCoroutine
// see kotlinx.coroutines.AbstractCoroutine.nameString