| Index: sdk/lib/core/uri.dart
|
| diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
|
| index c4dc8d94832b98d52e2bfd7955288f95f2665c59..ce9c8bb89be3617310461cd6d1af6181acfdc334 100644
|
| --- a/sdk/lib/core/uri.dart
|
| +++ b/sdk/lib/core/uri.dart
|
| @@ -819,101 +819,6 @@ class Uri {
|
| }
|
|
|
| /**
|
| - * Returns a new `Uri` based on this one, but with some parts replaced.
|
| - *
|
| - * This method takes the same parameters as the [new Uri] constructor,
|
| - * and they have the same meaning.
|
| - *
|
| - * At most one of [path] and [pathSegments] must be provided.
|
| - * Likewise, at most one of [query] and [queryParameters] must be provided.
|
| - *
|
| - * Each part that is not provided will default to the corresponding
|
| - * value from this `Uri` instead.
|
| - *
|
| - * This method is different from [Uri.resolve] which overrides in a
|
| - * hierarchial manner,
|
| - * and can instead replace each part of a `Uri` individually.
|
| - *
|
| - * Example:
|
| - *
|
| - * Uri uri1 = Uri.parse("a://b@c:4/d/e?f#g");
|
| - * Uri uri2 = uri1.replace(scheme: "A", path: "D/E/E", fragment: "G");
|
| - * print(uri2); // prints "A://b@c:4/D/E/E/?f#G"
|
| - *
|
| - * This method acts similarly to using the `new Uri` constructor with
|
| - * some of the arguments taken from this `Uri` . Example:
|
| - *
|
| - * Uri uri3 = new Uri(
|
| - * scheme: "A",
|
| - * userInfo: uri1.userInfo,
|
| - * host: uri1.host,
|
| - * port: uri1.port,
|
| - * path: "D/E/E",
|
| - * query: uri1.query,
|
| - * fragment: "G");
|
| - * print(uri3); // prints "A://b@c:4/D/E/E/?f#G"
|
| - * print(uri2 == uri3); // prints true.
|
| - *
|
| - * Using this method can be seen as a shorthand for the `Uri` constructor
|
| - * call above, but may also be slightly faster because the parts taken
|
| - * from this `Uri` need not be checked for validity again.
|
| - */
|
| - Uri replace({String scheme,
|
| - String userInfo,
|
| - String host,
|
| - int port,
|
| - String path,
|
| - Iterable<String> pathSegments,
|
| - String query,
|
| - Map<String, String> queryParameters,
|
| - String fragment}) {
|
| - if (scheme == null) {
|
| - scheme = this.scheme;
|
| - } else {
|
| - scheme = _makeScheme(scheme, scheme.length);
|
| - }
|
| - if (userInfo == null) {
|
| - userInfo = this.userInfo;
|
| - } else {
|
| - userInfo = _makeUserInfo(userInfo, 0, userInfo.length);
|
| - }
|
| - if (host == null) {
|
| - host = this.host;
|
| - } else {
|
| - host = _makeHost(host, 0, host.length, false);
|
| - }
|
| - if (port == null) {
|
| - port = this.port;
|
| - }
|
| -
|
| - bool ensureLeadingSlash = (host != "" || scheme == "file");
|
| - if (path == null && pathSegments == null) {
|
| - path = this.path;
|
| - if (ensureLeadingSlash && !path.isEmpty && !path.startsWith('/')) {
|
| - path = "/$path";
|
| - }
|
| - } else {
|
| - path = _makePath(path, 0, _stringOrNullLength(path), pathSegments,
|
| - ensureLeadingSlash);
|
| - }
|
| -
|
| - if (query == null && queryParameters == null) {
|
| - query = this.query;
|
| - } else {
|
| - query = _makeQuery(query, 0, _stringOrNullLength(query), queryParameters);
|
| - }
|
| -
|
| - if (fragment == null) {
|
| - fragment = this.fragment;
|
| - } else {
|
| - fragment = _makeFragment(fragment, 0, fragment.length);
|
| - }
|
| -
|
| - return new Uri._internal(
|
| - scheme, userInfo, host, port, path, query, fragment);
|
| - }
|
| -
|
| - /**
|
| * Returns the URI path split into its segments. Each of the
|
| * segments in the returned list have been decoded. If the path is
|
| * empty the empty list will be returned. A leading slash `/` does
|
|
|