File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717// Recursively walks `value`, returning a copy with any string equal to the
1818// sentinel replaced by `[NSNull null]`. Containers are rebuilt; primitives
1919// are returned as-is.
20- static id _Nullable OSDecodeNullSentinels (id _Nullable value) {
20+ static id OSDecodeNullSentinels (id value) {
2121 if ([value isKindOfClass: [NSDictionary class ]]) {
2222 NSDictionary *dict = (NSDictionary *)value;
2323 NSMutableDictionary *out = [NSMutableDictionary dictionaryWithCapacity: dict.count];
2424 [dict enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop) {
25- out[key] = OSDecodeNullSentinels (obj) ?: [ NSNull null ] ;
25+ out[key] = OSDecodeNullSentinels (obj);
2626 }];
2727 return out;
2828 }
2929 if ([value isKindOfClass: [NSArray class ]]) {
3030 NSArray *arr = (NSArray *)value;
3131 NSMutableArray *out = [NSMutableArray arrayWithCapacity: arr.count];
3232 for (id item in arr) {
33- [out addObject: OSDecodeNullSentinels (item) ?: [ NSNull null ] ];
33+ [out addObject: OSDecodeNullSentinels (item)];
3434 }
3535 return out;
3636 }
You can’t perform that action at this time.
0 commit comments