Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: utils/pub/version.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/validator/name.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/version.dart
diff --git a/utils/pub/version.dart b/utils/pub/version.dart
index f60ad19cf6a77cdd50c5eaae55568ae7c6f427cf..e7ca3d1299f56551ec10768476f0ed0ddc40783b 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -57,9 +57,9 @@ class Version implements Comparable, VersionConstraint {
}
try {
- int major = parseInt(match[1]);
- int minor = parseInt(match[2]);
- int patch = parseInt(match[3]);
+ int major = int.parse(match[1]);
+ int minor = int.parse(match[2]);
+ int patch = int.parse(match[3]);
String preRelease = match[5];
String build = match[8];
@@ -190,14 +190,14 @@ class Version implements Comparable, VersionConstraint {
/// Splits a string of dot-delimited identifiers into their component parts.
/// Identifiers that are numeric are converted to numbers.
List _splitParts(String text) {
- return text.split('.').map((part) {
+ return text.split('.').mappedBy((part) {
try {
- return parseInt(part);
+ return int.parse(part);
} on FormatException catch (ex) {
// Not a number.
return part;
}
- });
+ }).toList();
}
}
@@ -241,7 +241,7 @@ abstract class VersionConstraint {
/// allow. If constraints is empty, then it returns a VersionConstraint that
/// allows all versions.
factory VersionConstraint.intersection(
- Collection<VersionConstraint> constraints) {
+ Iterable<VersionConstraint> constraints) {
var constraint = new VersionRange();
for (var other in constraints) {
constraint = constraint.intersect(other);
« no previous file with comments | « utils/pub/validator/name.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698