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

Unified Diff: tools/testing/dart/http_server.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index f1f108853623608411c2b477d11dfebbb0848650..59c49e19a70d801ffe8b5d2e7aff3e755410a14b 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -196,20 +196,19 @@ class TestingServers {
if (pathSegments[0] == PREFIX_BUILDDIR) {
basePath = _buildDirectory;
relativePath = new Path(
- pathSegments.getRange(1, pathSegments.length - 1).join('/'));
+ pathSegments.sublist(1).join('/'));
floitsch 2013/03/14 15:46:06 In theory pathSegments.skip(1).join('/') would be
Lasse Reichstein Nielsen 2013/03/15 09:13:09 This code is in the testing directory, so I'll rev
} else if (pathSegments[0] == PREFIX_DARTDIR) {
basePath = TestUtils.dartDir();
relativePath = new Path(
- pathSegments.getRange(1, pathSegments.length - 1).join('/'));
+ pathSegments.sublist(1).join('/'));
}
var packagesDirName = 'packages';
var packagesIndex = pathSegments.indexOf(packagesDirName);
if (packagesIndex != -1) {
var start = packagesIndex + 1;
- var length = pathSegments.length - start;
basePath = _buildDirectory.append(packagesDirName);
relativePath = new Path(
- pathSegments.getRange(start, length).join('/'));
+ pathSegments.sublist(start).join('/'));
}
if (basePath != null && relativePath != null) {
return basePath.join(relativePath);

Powered by Google App Engine
This is Rietveld 408576698