Fix map literals from change 17410

Remove any type arguments from map literals
that had one type argument before change 17410.
Review URL: https://codereview.chromium.org//12045024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17412 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
hausner@google.com 2013-01-22 17:31:29 +00:00
parent 9e2ceb4633
commit a885f8638b
14 changed files with 15 additions and 15 deletions

View file

@ -82,7 +82,7 @@ abstract class BaseRequest {
/// Creates a new HTTP request.
BaseRequest(this.method, this.url)
: headers = <String, String>{};
: headers = {};
/// Finalizes the HTTP request in preparation for it being sent. This freezes
/// all mutable fields and returns a single-subscription [ByteStream] that

View file

@ -43,7 +43,7 @@ abstract class BaseResponse {
this.statusCode,
this.contentLength,
{this.request,
this.headers: const <String, String>{},
this.headers: const {},
this.isRedirect: false,
this.persistentConnection: true,
this.reasonPhrase});

View file

@ -56,7 +56,7 @@ class IOClient extends BaseClient {
};
connection.onResponse = (response) {
var headers = <String, String>{};
var headers = {};
response.headers.forEach((key, value) => headers[key] = value);
if (completed) return;

View file

@ -82,7 +82,7 @@ class MultipartRequest extends BaseRequest {
/// Creates a new [MultipartRequest].
MultipartRequest(String method, Uri url)
: super(method, url),
fields = <String, String>{},
fields = {},
_files = new CollectionSink<MultipartFile>(<MultipartFile>[]);
/// Freezes all mutable fields and returns a single-subscription [ByteStream]

View file

@ -31,7 +31,7 @@ class Response extends BaseResponse {
String body,
int statusCode,
{BaseRequest request,
Map<String, String> headers: const <String, String>{},
Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})
@ -49,7 +49,7 @@ class Response extends BaseResponse {
List<int> bodyBytes,
int statusCode,
{BaseRequest request,
Map<String, String> headers: const <String, String>{},
Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})

View file

@ -26,7 +26,7 @@ class StreamedResponse extends BaseResponse {
int statusCode,
int contentLength,
{BaseRequest request,
Map<String, String> headers: const <String, String>{},
Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})

View file

@ -19,7 +19,7 @@ import 'byte_stream.dart';
/// queryToMap("foo=bar&baz=bang&qux");
/// //=> {"foo": "bar", "baz": "bang", "qux": ""}
Map<String, String> queryToMap(String queryList) {
var map = <String, String>{};
var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;

View file

@ -70,7 +70,7 @@ void startServer() {
var content = {
'method': request.method,
'path': request.path,
'headers': <String, String>{}
'headers': {}
};
if (requestBody != null) content['body'] = requestBody;
request.headers.forEach((name, values) {

View file

@ -20,7 +20,7 @@ Uri addQueryParameters(Uri url, Map<String, String> parameters) {
/// Convert a URL query string (or `application/x-www-form-urlencoded` body)
/// into a [Map] from parameter names to values.
Map<String, String> queryToMap(String queryList) {
var map = <String, String>{};
var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;

View file

@ -155,7 +155,7 @@ void renamePlaceholders(
Function makeRenamer(generateUniqueName) =>
(library, originalName) =>
renamed.putIfAbsent(library, () => <String, String>{})
renamed.putIfAbsent(library, () => {})
.putIfAbsent(originalName,
() => generateUniqueName(originalName));

View file

@ -20,7 +20,7 @@ const int VM_PLATFORM = 2;
* and extract the necessary information without executing it
* while other tools can access via execution.
*/
const Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {
const Map<String, LibraryInfo> LIBRARIES = const {
"async": const LibraryInfo(
"async/async.dart",

View file

@ -161,7 +161,7 @@ class CurlClient extends http.BaseClient {
var isRedirect = status >= 300 && status < 400;
var reasonPhrase =
Strings.join(statusParts.getRange(2, statusParts.length - 2), " ");
var headers = <String, String>{};
var headers = {};
for (var line in lines) {
if (line.isEmpty) continue;
var split = split1(line, ":");

View file

@ -143,7 +143,7 @@ Uri addQueryParameters(Uri url, Map<String, String> parameters) {
/// Convert a URL query string (or `application/x-www-form-urlencoded` body)
/// into a [Map] from parameter names to values.
Map<String, String> queryToMap(String queryList) {
var map = <String, String>{};
var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;

View file

@ -105,7 +105,7 @@ void startServer() {
var content = {
'method': request.method,
'path': request.path,
'headers': <String, String>{}
'headers': {}
};
if (requestBody != null) content['body'] = requestBody;
request.headers.forEach((name, values) {