From 4196f59a445a53246f3835b52b49613c9ebd091e Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 14 Dec 2018 16:06:15 -0800 Subject: [PATCH] more nullability annotation --- src/objective-c/GRPCClient/GRPCCall.h | 2 +- src/objective-c/GRPCClient/GRPCCallOptions.h | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index d4d16024fa0..404d4b76568 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -282,7 +282,7 @@ NS_ASSUME_NONNULL_END */ @interface GRPCCall : GRXWriter -- (nullable instancetype)init NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; /** * The container of the request headers of an RPC conforms to this protocol, which is a subset of diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h index b7f08480dc0..b866f268ee1 100644 --- a/src/objective-c/GRPCClient/GRPCCallOptions.h +++ b/src/objective-c/GRPCClient/GRPCCallOptions.h @@ -18,6 +18,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + /** * Safety remark of a gRPC method as defined in RFC 2616 Section 9.1 */ @@ -66,7 +68,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)provideTokenToHandler:(void (^_Nullable)(NSString *_Nullable token))handler; +- (void)provideTokenToHandler:(void (^)(NSString *_Nullable token))handler; /** * This method is deprecated. Please use \a provideTokenToHandler. @@ -74,7 +76,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 (^_Nullable)(NSString *_Nullable token))handler; +- (void)getTokenWithHandler:(void (^)(NSString *_Nullable token))handler; @end @@ -210,7 +212,7 @@ typedef NS_ENUM(NSUInteger, GRPCTransportType) { /** * Return if the channel options are equal to another object. */ -- (BOOL)hasChannelOptionsEqualTo:(nonnull GRPCCallOptions *)callOptions; +- (BOOL)hasChannelOptionsEqualTo:(GRPCCallOptions *)callOptions; /** * Hash for channel options. @@ -352,3 +354,5 @@ typedef NS_ENUM(NSUInteger, GRPCTransportType) { @property(readwrite) NSUInteger channelID; @end + +NS_ASSUME_NONNULL_END