From d806ce71d762a1a2fc03e41cc186d002ee604316 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 19 Nov 2018 10:08:23 -0800 Subject: [PATCH] more nullability --- src/objective-c/GRPCClient/GRPCCallOptions.h | 2 +- .../GRPCClient/private/GRPCSecureChannelFactory.h | 6 +++--- src/objective-c/tests/APIv2Tests/APIv2Tests.m | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h index 61d85642863..e88e28109cf 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 diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h b/src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h index 5dc5a973120..588239b7064 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 + (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 1b14043af92..32f2122f79b 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); }