Skip to content

Commit

Permalink
api: Forward getMethodDescriptor() in ForwardingServerCall
Browse files Browse the repository at this point in the history
  • Loading branch information
ejona86 committed Mar 1, 2023
1 parent 8d12baa commit a9a7cd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions api/src/main/java/io/grpc/ForwardingServerCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public void sendMessage(RespT message) {
delegate().sendMessage(message);
}

@Override
public MethodDescriptor<ReqT, RespT> getMethodDescriptor() {
return delegate().getMethodDescriptor();
}

/**
* A simplified version of {@link ForwardingServerCall} where subclasses can pass in a {@link
* ServerCall} as the delegate.
Expand All @@ -49,10 +54,5 @@ protected SimpleForwardingServerCall(ServerCall<ReqT, RespT> delegate) {
protected ServerCall<ReqT, RespT> delegate() {
return delegate;
}

@Override
public MethodDescriptor<ReqT, RespT> getMethodDescriptor() {
return delegate.getMethodDescriptor();
}
}
}
5 changes: 0 additions & 5 deletions api/src/test/java/io/grpc/ForwardingServerCallTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public class ForwardingServerCallTest {
public void setUp() {
forwarder =
new ForwardingServerCall<Integer, Integer>() {
@Override
public MethodDescriptor<Integer, Integer> getMethodDescriptor() {
return serverCall.getMethodDescriptor();
}

@Override
protected ServerCall<Integer, Integer> delegate() {
return serverCall;
Expand Down

0 comments on commit a9a7cd1

Please sign in to comment.