-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
Description
Hello, I’m interested in the grpc-java project and have been analyzing its pull requests.
While reviewing PR #12259, I noticed that a condition in an if statement appears to be always false. The relevant line is below (line 228 in the BlockingClientCall class):
if (savedCloseState == null || savedCloseState.status == null)In this if clause, savedCloseState.status seems to always be non-null, because of the following check in the CloseState constructor:
CloseState(Status status, Metadata trailers) {
this.status = Preconditions.checkNotNull(status, "status");
this.trailers = trailers;
}
Given this, I was wondering whether it would make sense to remove the savedCloseState.status == null condition to simplify the code:
if (savedCloseState == null)
Is this condition intentional, or would a cleanup PR in this area be acceptable?