From 08f9139f4d498b04b51d7838e84e195f7cef36b4 Mon Sep 17 00:00:00 2001 From: Satheesh Kannan Date: Tue, 30 Jul 2024 15:11:34 +0530 Subject: [PATCH] chore: address the sonarcloud issue This fix fill eliminate the possibility of returning null pointer/ null reference --- Sources/Classes/RSUtils.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Classes/RSUtils.m b/Sources/Classes/RSUtils.m index f05ae20b..998ce0f6 100644 --- a/Sources/Classes/RSUtils.m +++ b/Sources/Classes/RSUtils.m @@ -277,7 +277,7 @@ + (NSString*) serializeSpecialFloatingNumber: (NSNumber *) number { } +(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL{ - NSArray *queryItems; + NSMutableArray *queryItems = [NSMutableArray array]; if (deepLinkURL) { // Create NSURLComponents object NSURLComponents *components = [NSURLComponents componentsWithURL:deepLinkURL resolvingAgainstBaseURL:NO]; @@ -286,7 +286,7 @@ +(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL{ queryItems = components.queryItems; } - return queryItems; + return queryItems; } unsigned int MAX_EVENT_SIZE = 32 * 1024; // 32 KB unsigned int MAX_BATCH_SIZE = 500 * 1024; // 500 KB