Skip to content

Commit

Permalink
null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-jalgaonkar committed Jun 21, 2024
1 parent 4f7622c commit 8b01bc8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -101,8 +102,8 @@ public <ReqT, RespT> Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call,
}
for (Filter filter : filters) {
try {
ServerRequestParams serverRequestParams = new ServerRequestParams(call.getAttributes()
.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR).toString(),
ServerRequestParams serverRequestParams = new ServerRequestParams(Objects.requireNonNull(call.getAttributes()
.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR)).toString(),
call.getMethodDescriptor().getFullMethodName().toLowerCase());
filter.doFilterRequest(serverRequestParams,headers);
for (Metadata.Key key : filter.getForwardHeaderKeys()) {
Expand Down

0 comments on commit 8b01bc8

Please sign in to comment.