aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-11-19 10:08:23 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-11-19 10:08:23 -0800
commitd806ce71d762a1a2fc03e41cc186d002ee604316 (patch)
tree82db9cb981bce7919a4c7bf67494d4be522b6487
parent29e1591904539fcb6d92ba49e69ed27ee9d3349d (diff)
more nullability
-rw-r--r--src/objective-c/GRPCClient/GRPCCallOptions.h2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h6
-rw-r--r--src/objective-c/tests/APIv2Tests/APIv2Tests.m3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h
index 61d8564286..e88e28109c 100644
--- a/src/objective-c/GRPCClient/GRPCCallOptions.h
+++ b/src/objective-c/GRPCClient/GRPCCallOptions.h
@@ -64,7 +64,7 @@ typedef NS_ENUM(NSUInteger, GRPCTransportType) {
* This method is called when gRPC is about to start the call. When OAuth token is acquired,
* \a handler is expected to be called with \a token being the new token to be used for this call.
*/
-- (void)getTokenWithHandler:(void (^)(NSString *token))handler;
+- (void)getTokenWithHandler:(void (^)(NSString * _Nullable token))handler;
@end
@interface GRPCCallOptions : NSObject<NSCopying, NSMutableCopying>
diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h b/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h
index 5dc5a97312..588239b706 100644
--- a/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h
+++ b/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h
@@ -24,9 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface GRPCSecureChannelFactory : NSObject<GRPCChannelFactory>
+ (nullable instancetype)factoryWithPEMRootCertificates:(nullable NSString *)rootCerts
- privateKey:(nullable NSString *)privateKey
- certChain:(nullable NSString *)certChain
- error:(NSError **)errorPtr;
+ privateKey:(nullable NSString *)privateKey
+ certChain:(nullable NSString *)certChain
+ error:(NSError **)errorPtr;
- (nullable grpc_channel *)createChannelWithHost:(NSString *)host
channelArgs:(nullable NSDictionary *)args;
diff --git a/src/objective-c/tests/APIv2Tests/APIv2Tests.m b/src/objective-c/tests/APIv2Tests/APIv2Tests.m
index 1b14043af9..32f2122f79 100644
--- a/src/objective-c/tests/APIv2Tests/APIv2Tests.m
+++ b/src/objective-c/tests/APIv2Tests/APIv2Tests.m
@@ -93,8 +93,7 @@ static const NSTimeInterval kTestTimeout = 16;
}
}
-- (void)closedWithTrailingMetadata:(NSDictionary *)trailingMetadata
- error:(NSError *)error {
+- (void)closedWithTrailingMetadata:(NSDictionary *)trailingMetadata error:(NSError *)error {
if (self->_closeCallback) {
self->_closeCallback(trailingMetadata, error);
}