Skip to content

Commit

Permalink
Don't check state twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Sep 27, 2024
1 parent 8d93304 commit 36222a0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions s2a/src/main/java/io/grpc/s2a/S2AChannelCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Strings.isNullOrEmpty;

import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -109,8 +108,6 @@ public Builder setLocalUid(String localUid) {
}

public ChannelCredentials build() throws IOException {
checkState(!isNullOrEmpty(s2aAddress), "S2A address must not be null or empty.");
checkNotNull(s2aChannelCredentials, "S2A channel credentials must not be null");
ObjectPool<Channel> s2aChannelPool =
SharedResourcePool.forResource(
S2AHandshakerServiceChannel.getChannelResource(s2aAddress, s2aChannelCredentials));
Expand Down

0 comments on commit 36222a0

Please sign in to comment.