Index: sdk/lib/core/uri.dart |
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart |
index a1a5b5d329600c268f15e42fdf08e2212dd5673a..99591cd745702bbe7fd13caf9dbb0df859d209ca 100644 |
--- a/sdk/lib/core/uri.dart |
+++ b/sdk/lib/core/uri.dart |
@@ -165,7 +165,7 @@ class Uri { |
String path, |
Iterable<String> pathSegments, |
String query, |
- Map<String, dynamic> queryParameters, |
+ Map<String, dynamic/*String|Iterable<String>*/> queryParameters, |
String fragment}) { |
scheme = _makeScheme(scheme, 0, _stringOrNullLength(scheme)); |
userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo)); |
@@ -1010,7 +1010,7 @@ class Uri { |
String path, |
Iterable<String> pathSegments, |
String query, |
- Map<String, String> queryParameters, |
+ Map<String, dynamic/*String|Iterable<String>*/> queryParameters, |
String fragment}) { |
// Set to true if the scheme has (potentially) changed. |
// In that case, the default port may also have changed and we need |
@@ -1373,8 +1373,9 @@ class Uri { |
return _removeDotSegments(path); |
} |
- static String _makeQuery(String query, int start, int end, |
- Map<String, String> queryParameters) { |
+ static String _makeQuery( |
+ String query, int start, int end, |
+ Map<String, dynamic/*String|Iterable<String>*/> queryParameters) { |
if (query == null && queryParameters == null) return null; |
if (query != null && queryParameters != null) { |
throw new ArgumentError('Both query and queryParameters specified'); |
@@ -1394,7 +1395,8 @@ class Uri { |
} |
} |
- queryParameters.forEach((key, value) { |
+ queryParameters.forEach( |
+ (String key, dynamic/*String|Iterable<String>*/ value) { |
if (value == null || value is String) { |
writeParameter(key, value); |
} else { |
@@ -1469,7 +1471,7 @@ class Uri { |
static String _escapeChar(int char) { |
assert(char <= 0x10ffff); // It's a valid unicode code point. |
- List codeUnits; |
+ List<int> codeUnits; |
if (char < 0x80) { |
// ASCII, a single percent encoded sequence. |
codeUnits = new List(3); |
@@ -2366,7 +2368,7 @@ class Uri { |
error('an address without a wildcard must contain exactly 8 parts'); |
} |
// TODO(ajohnsen): Consider using Uint8List. |
Lasse Reichstein Nielsen
2016/04/16 09:58:22
Do consider doing that.
floitsch
2016/04/19 15:36:39
Done.
|
- List bytes = new List<int>(16); |
+ List<int> bytes = new List<int>(16); |
for (int i = 0, index = 0; i < parts.length; i++) { |
int value = parts[i]; |
if (value == -1) { |
@@ -2830,7 +2832,7 @@ class UriData { |
Map<String, String> parameters, |
bool base64: false}) { |
StringBuffer buffer = new StringBuffer(); |
- List indices = [_noScheme]; |
+ List<int> indices = [_noScheme]; |
String charsetName; |
String encodingName; |
if (parameters != null) charsetName = parameters["charset"]; |
@@ -2867,7 +2869,7 @@ class UriData { |
Map<String, String> parameters, |
percentEncoded: false}) { |
StringBuffer buffer = new StringBuffer(); |
- List indices = [_noScheme]; |
+ List<int> indices = [_noScheme]; |
_writeUri(mimeType, null, parameters, buffer, indices); |
indices.add(buffer.length); |
if (percentEncoded) { |
@@ -3231,7 +3233,7 @@ class UriData { |
const int slash = 0x2f; |
const int semicolon = 0x3b; |
const int equals = 0x3d; |
- List indices = [start - 1]; |
+ List<int> indices = [start - 1]; |
int slashIndex = -1; |
var char; |
int i = start; |