mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
`SendChannel.offer` is deprecated.
This commit is done to migrate to 1.6.0 coroutines
(where this deprecation is a compilation error)
You might be thinking: why didn't I use officially recommended migration method:
```
channel.trySend(element)
.onClosed { throw it ?: ClosedSendChannelException("Channel was closed normally") }
.isSuccess
```
but used instead:
```
channel.trySend(element)
.onClosed { throw IllegalStateException(it) }
.isSuccess
```
I believe that my migration method is better because in my case real stacktrace is known in
cases when `it != null`
GitOrigin-RevId: fa4f133d4230e5dd9ad5d3141b9d6bfed300059c