[perf][ios] annotate NSNumbers as `nonnull` to fix RN unspecified nullability compatibility error
This commit is contained in:
parent
7e7794cb70
commit
e74a347dfc
|
@ -105,7 +105,7 @@ RCT_EXPORT_METHOD(getTraceLongMetric:
|
||||||
RCT_EXPORT_METHOD(incrementTraceMetric:
|
RCT_EXPORT_METHOD(incrementTraceMetric:
|
||||||
(NSString *) identifier
|
(NSString *) identifier
|
||||||
metricName:(NSString *) metricName
|
metricName:(NSString *) metricName
|
||||||
incrementBy:(NSNumber *) incrementBy
|
incrementBy:(nonnull NSNumber *) incrementBy
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
int64_t byInt = [incrementBy intValue];
|
int64_t byInt = [incrementBy intValue];
|
||||||
|
@ -132,7 +132,7 @@ RCT_EXPORT_METHOD(putTraceAttribute:
|
||||||
RCT_EXPORT_METHOD(putTraceMetric:
|
RCT_EXPORT_METHOD(putTraceMetric:
|
||||||
(NSString *) identifier
|
(NSString *) identifier
|
||||||
attribute:(NSString *) attribute
|
attribute:(NSString *) attribute
|
||||||
value:(NSNumber *) value
|
value:(nonnull NSNumber *) value
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
int64_t byInt = [value intValue];
|
int64_t byInt = [value intValue];
|
||||||
|
@ -220,7 +220,7 @@ RCT_EXPORT_METHOD(removeHttpMetricAttribute:
|
||||||
RCT_EXPORT_METHOD(setHttpMetricResponseCode:
|
RCT_EXPORT_METHOD(setHttpMetricResponseCode:
|
||||||
(NSString *) url
|
(NSString *) url
|
||||||
httpMethod:(NSString *) httpMethod
|
httpMethod:(NSString *) httpMethod
|
||||||
code:(NSNumber *) code
|
code:(nonnull NSNumber *) code
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setResponseCode:[code integerValue]];
|
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setResponseCode:[code integerValue]];
|
||||||
|
@ -230,7 +230,7 @@ RCT_EXPORT_METHOD(setHttpMetricResponseCode:
|
||||||
RCT_EXPORT_METHOD(setHttpMetricRequestPayloadSize:
|
RCT_EXPORT_METHOD(setHttpMetricRequestPayloadSize:
|
||||||
(NSString *) url
|
(NSString *) url
|
||||||
httpMethod:(NSString *) httpMethod
|
httpMethod:(NSString *) httpMethod
|
||||||
bytes:(NSNumber *) bytes
|
bytes:(nonnull NSNumber *) bytes
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setRequestPayloadSize:[bytes longLongValue]];
|
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setRequestPayloadSize:[bytes longLongValue]];
|
||||||
|
@ -250,7 +250,7 @@ RCT_EXPORT_METHOD(setHttpMetricResponseContentType:
|
||||||
RCT_EXPORT_METHOD(setHttpMetricResponsePayloadSize:
|
RCT_EXPORT_METHOD(setHttpMetricResponsePayloadSize:
|
||||||
(NSString *) url
|
(NSString *) url
|
||||||
httpMethod:(NSString *) httpMethod
|
httpMethod:(NSString *) httpMethod
|
||||||
bytes:(NSNumber *) bytes
|
bytes:(nonnull NSNumber *) bytes
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setResponsePayloadSize:[bytes longLongValue]];
|
[[self getOrCreateHttpMetric:url httpMethod:httpMethod] setResponsePayloadSize:[bytes longLongValue]];
|
||||||
|
|
Loading…
Reference in New Issue