File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
stdlib/public/SDK/Foundation Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -1281,12 +1281,7 @@ fileprivate struct _JSONKeyedDecodingContainer<K : CodingKey> : KeyedDecodingCon
1281
1281
1282
1282
private func _superDecoder( forKey key: CodingKey ) throws -> Decoder {
1283
1283
return try self . decoder. with ( pushedKey: key) {
1284
- guard let value = self . container [ key. stringValue] else {
1285
- throw DecodingError . keyNotFound ( key,
1286
- DecodingError . Context ( codingPath: self . codingPath,
1287
- debugDescription: " Cannot get superDecoder() -- no value found for key \" \( key. stringValue) \" " ) )
1288
- }
1289
-
1284
+ let value = self . container [ key. stringValue]
1290
1285
return _JSONDecoder ( referencing: value, at: self . decoder. codingPath, options: self . decoder. options)
1291
1286
}
1292
1287
}
@@ -1631,12 +1626,6 @@ fileprivate struct _JSONUnkeyedDecodingContainer : UnkeyedDecodingContainer {
1631
1626
}
1632
1627
1633
1628
let value = self . container [ self . currentIndex]
1634
- guard !( value is NSNull ) else {
1635
- throw DecodingError . valueNotFound ( Decoder . self,
1636
- DecodingError . Context ( codingPath: self . codingPath,
1637
- debugDescription: " Cannot get superDecoder() -- found null value instead. " ) )
1638
- }
1639
-
1640
1629
self . currentIndex += 1
1641
1630
return _JSONDecoder ( referencing: value, at: self . decoder. codingPath, options: self . decoder. options)
1642
1631
}
Original file line number Diff line number Diff line change @@ -1053,12 +1053,7 @@ fileprivate struct _PlistKeyedDecodingContainer<K : CodingKey> : KeyedDecodingCo
1053
1053
1054
1054
private func _superDecoder( forKey key: CodingKey ) throws -> Decoder {
1055
1055
return try self . decoder. with ( pushedKey: key) {
1056
- guard let value = self . container [ key. stringValue] else {
1057
- throw DecodingError . valueNotFound ( Decoder . self,
1058
- DecodingError . Context ( codingPath: self . codingPath,
1059
- debugDescription: " Cannot get superDecoder() -- no value found for key \" \( key. stringValue) \" " ) )
1060
- }
1061
-
1056
+ let value = self . container [ key. stringValue]
1062
1057
return _PlistDecoder ( referencing: value, at: self . decoder. codingPath, options: self . decoder. options)
1063
1058
}
1064
1059
}
@@ -1402,12 +1397,6 @@ fileprivate struct _PlistUnkeyedDecodingContainer : UnkeyedDecodingContainer {
1402
1397
}
1403
1398
1404
1399
let value = self . container [ self . currentIndex]
1405
- guard !( value is NSNull ) else {
1406
- throw DecodingError . valueNotFound ( Decoder . self,
1407
- DecodingError . Context ( codingPath: self . codingPath,
1408
- debugDescription: " Cannot get superDecoder() -- found null value instead. " ) )
1409
- }
1410
-
1411
1400
self . currentIndex += 1
1412
1401
return _PlistDecoder ( referencing: value, at: self . decoder. codingPath, options: self . decoder. options)
1413
1402
}
You can’t perform that action at this time.
0 commit comments