aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-10 18:10:21 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-10 18:10:21 -0700
commit413077101eab400635732b813da4f1e4a5b69c5a (patch)
tree969a86925cfd6cce4d33cce351372719e1171639 /src/objective-c
parent161dc27b2d3882ab3f8a8bcc26733a729e034583 (diff)
requestOptions precondition check polishing
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index c0413ec6c2..c9ee508486 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -98,7 +98,7 @@ const char *kCFStreamVarName = "grpc_cfstream";
- (instancetype)initWithRequestOptions:(GRPCRequestOptions *)requestOptions
responseHandler:(id<GRPCResponseHandler>)responseHandler
callOptions:(GRPCCallOptions *)callOptions {
- if (!requestOptions || !requestOptions.host || !requestOptions.path) {
+ if (requestOptions.host.length == 0 || requestOptions.path.length == 0) {
[NSException raise:NSInvalidArgumentException format:@"Neither host nor path can be nil."];
}