From 41b08d01f37ed1ebf746f152a8ed58ed5f34c16f Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Mon, 16 Jan 2023 12:49:03 +0100 Subject: [PATCH] NSURLSession: fix unimplemented method returns --- Source/NSURLSession.m | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Source/NSURLSession.m b/Source/NSURLSession.m index 923a9b539..80e93f86b 100644 --- a/Source/NSURLSession.m +++ b/Source/NSURLSession.m @@ -340,21 +340,18 @@ - (NSURLSessionDataTask*) dataTaskWithURL: (NSURL*)url - (NSURLSessionUploadTask*) uploadTaskWithRequest: (NSURLRequest*)request fromFile: (NSURL*)fileURL { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (NSURLSessionUploadTask*) uploadTaskWithRequest: (NSURLRequest*)request fromData: (NSData*)bodyData; { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (NSURLSessionUploadTask*) uploadTaskWithStreamedRequest: (NSURLRequest*)request { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (NSURLSessionDownloadTask*) downloadTaskWithRequest: (NSURLRequest*)request @@ -387,8 +384,7 @@ - (NSURLSessionDownloadTask*) downloadTaskWithURL: (NSURL*)url - (NSURLSessionDownloadTask*) downloadTaskWithResumeData: (NSData*)resumeData { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (void) getTasksWithCompletionHandler: (void (^)(GS_GENERIC_CLASS(NSArray, NSURLSessionDataTask*) *dataTasks, GS_GENERIC_CLASS(NSArray, NSURLSessionUploadTask*) *uploadTasks, GS_GENERIC_CLASS(NSArray, NSURLSessionDownloadTask*) *downloadTasks))completionHandler @@ -469,16 +465,14 @@ - (NSURLSessionUploadTask*) uploadTaskWithRequest: (NSURLRequest*)request fromFile: (NSURL*)fileURL completionHandler: (void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (NSURLSessionUploadTask*) uploadTaskWithRequest: (NSURLRequest*)request fromData: (NSData*)bodyData completionHandler: (void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } - (NSURLSessionDownloadTask*) downloadTaskWithRequest: (NSURLRequest*)request @@ -516,8 +510,7 @@ - (NSURLSessionDownloadTask*) downloadTaskWithURL: (NSURL*)url - (NSURLSessionDownloadTask*) downloadTaskWithResumeData: (NSData*)resumeData completionHandler: (void (^)(NSURL *location, NSURLResponse *response, NSError *error))completionHandler { - [self notImplemented: _cmd]; - return nil; + return [self notImplemented: _cmd]; } @end