diff options
author | 2018-10-29 15:21:05 -0700 | |
---|---|---|
committer | 2018-10-29 15:21:05 -0700 | |
commit | abe4aae40049ca73fb29ccf325cc3734408d9aae (patch) | |
tree | 28369b57ede1ee0f7e7f5a352a868e6c60c94a53 /src | |
parent | a8c4eb7d2742eb3ba370d9801cc1b83e35d551a9 (diff) |
Remove length check in GRPCCall for backwards compatibility
Diffstat (limited to 'src')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 44432a120a..ca2cdd6b31 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -391,7 +391,8 @@ const char *kCFStreamVarName = "grpc_cfstream"; callSafety:(GRPCCallSafety)safety requestsWriter:(GRXWriter *)requestWriter callOptions:(GRPCCallOptions *)callOptions { - if (host.length == 0 || path.length == 0) { + // Purposely using pointer rather than length ([host length] == 0) for backwards compatibility. + if (!host || !path) { [NSException raise:NSInvalidArgumentException format:@"Neither host nor path can be nil or empty."]; } |