api: clean up duplicated method in InternalServerInterceptors (#8261)

This commit is contained in:
Chengyuan Zhang 2021-06-15 15:11:56 -07:00 committed by GitHub
parent c8ba601529
commit 25122f9e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -21,11 +21,6 @@ package io.grpc;
*/
@Internal
public final class InternalServerInterceptors {
public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> interceptCallHandler(
ServerInterceptor interceptor, ServerCallHandler<ReqT, RespT> callHandler) {
return ServerInterceptors.InterceptCallHandler.create(interceptor, callHandler);
}
public static <OrigReqT, OrigRespT, WrapReqT, WrapRespT>
ServerMethodDefinition<WrapReqT, WrapRespT> wrapMethod(
final ServerMethodDefinition<OrigReqT, OrigRespT> definition,

View File

@ -604,7 +604,7 @@ public final class ServerImpl extends io.grpc.Server implements InternalInstrume
stream.getAuthority()));
ServerCallHandler<ReqT, RespT> handler = methodDef.getServerCallHandler();
for (ServerInterceptor interceptor : interceptors) {
handler = InternalServerInterceptors.interceptCallHandler(interceptor, handler);
handler = InternalServerInterceptors.interceptCallHandlerCreate(interceptor, handler);
}
ServerMethodDefinition<ReqT, RespT> interceptedDef = methodDef.withServerCallHandler(handler);
ServerMethodDefinition<?, ?> wMethodDef = binlog == null