Skip to content

Commit c49bdb0

Browse files
committed
Implement stub for NullCall
1 parent 2c67703 commit c49bdb0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

wire-grpc-mockwebserver/api/wire-grpc-mockwebserver.api

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ public final class com/squareup/wire/mockwebserver/GrpcDispatcher$Companion$Null
2525
public synthetic fun isExecuted ()Z
2626
public fun request ()Ljava/lang/Void;
2727
public synthetic fun request ()Lokhttp3/Request;
28+
public synthetic fun tag (Ljava/lang/Class;)Ljava/lang/Object;
29+
public fun tag (Ljava/lang/Class;)Ljava/lang/Void;
30+
public synthetic fun tag (Ljava/lang/Class;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
31+
public fun tag (Ljava/lang/Class;Lkotlin/jvm/functions/Function0;)Ljava/lang/Void;
32+
public synthetic fun tag (Lkotlin/reflect/KClass;)Ljava/lang/Object;
33+
public fun tag (Lkotlin/reflect/KClass;)Ljava/lang/Void;
34+
public synthetic fun tag (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
35+
public fun tag (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;)Ljava/lang/Void;
2836
public fun timeout ()Lokio/Timeout;
2937
}
3038

wire-grpc-mockwebserver/src/main/java/com/squareup/wire/mockwebserver/GrpcDispatcher.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import com.squareup.wire.Service
3030
import com.squareup.wire.internal.GrpcMessageSink
3131
import com.squareup.wire.internal.GrpcMessageSource
3232
import java.lang.reflect.Method
33+
import kotlin.reflect.KClass
3334
import okhttp3.Call
3435
import okhttp3.Callback
3536
import okhttp3.Headers.Companion.headersOf
@@ -204,6 +205,10 @@ class GrpcDispatcher(
204205
override fun isExecuted() = error("unexpected call")
205206
override fun request() = error("unexpected call")
206207
override fun timeout() = Timeout.NONE
208+
override fun <T : Any> tag(type: KClass<T>) = error("unexpected call")
209+
override fun <T> tag(type: Class<out T>) = error("unexpected call")
210+
override fun <T : Any> tag(type: KClass<T>, computeIfAbsent: () -> T) = error("unexpected call")
211+
override fun <T : Any> tag(type: Class<T>, computeIfAbsent: () -> T) = error("unexpected call")
207212
}
208213

209214
/**

0 commit comments

Comments
 (0)