Unverified Commit fb0ab99d authored by Hans Muller's avatar Hans Muller Committed by GitHub

Remove Number.tryParse() straggler (#16570)

parent e7154bee
...@@ -784,7 +784,8 @@ class PubspecChecksum extends PubspecLine { ...@@ -784,7 +784,8 @@ class PubspecChecksum extends PubspecLine {
if (twoLines.length != 2) { if (twoLines.length != 2) {
return new PubspecChecksum(-1, line); return new PubspecChecksum(-1, line);
} }
final int value = int.tryParse(twoLines.last.trim(), radix: 16) ?? -1; // ignore: deprecated_member_use
final int value = int.parse(twoLines.last.trim(), radix: 16, onError: (String _) => -1);
return new PubspecChecksum(value, line); return new PubspecChecksum(value, line);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment