Skip to content

Commit 3f6e1f0

Browse files
committed
Reduce unnecessary @PublishedApi surface of UnbiasedSelectBuilderImpl
1 parent 110ca3d commit 3f6e1f0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

kotlinx-coroutines-core/api/kotlinx-coroutines-core.api

-2
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,6 @@ public final class kotlinx/coroutines/selects/SelectUnbiasedKt {
12491249

12501250
public final class kotlinx/coroutines/selects/UnbiasedSelectBuilderImpl : kotlinx/coroutines/selects/SelectBuilder {
12511251
public fun <init> (Lkotlin/coroutines/Continuation;)V
1252-
public final fun getClauses ()Ljava/util/ArrayList;
1253-
public final fun getInstance ()Lkotlinx/coroutines/selects/SelectBuilderImpl;
12541252
public final fun handleBuilderException (Ljava/lang/Throwable;)V
12551253
public final fun initSelectResult ()Ljava/lang/Object;
12561254
public fun invoke (Lkotlinx/coroutines/selects/SelectClause0;Lkotlin/jvm/functions/Function1;)V

kotlinx-coroutines-core/common/src/selects/SelectUnbiased.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ public suspend inline fun <R> selectUnbiased(crossinline builder: SelectBuilder<
3030

3131

3232
@PublishedApi
33-
internal class UnbiasedSelectBuilderImpl<in R>(uCont: Continuation<R>) :
34-
SelectBuilder<R> {
35-
val instance = SelectBuilderImpl(uCont)
36-
val clauses = arrayListOf<() -> Unit>()
33+
internal class UnbiasedSelectBuilderImpl<in R>(
34+
uCont: Continuation<R>
35+
) : SelectBuilder<R> {
36+
private val instance = SelectBuilderImpl(uCont)
37+
private val clauses = arrayListOf<() -> Unit>()
3738

3839
@PublishedApi
3940
internal fun handleBuilderException(e: Throwable): Unit = instance.handleBuilderException(e)

0 commit comments

Comments
 (0)