Chromium Code Reviews| Index: pkg/analysis_server/lib/src/protocol.dart |
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart |
| index 75b29c7a60be4825563fd3b48fe0d764e371049a..50ace6ed2ed66512eb07cd209fa4d6a1a18a81a7 100644 |
| --- a/pkg/analysis_server/lib/src/protocol.dart |
| +++ b/pkg/analysis_server/lib/src/protocol.dart |
| @@ -69,16 +69,16 @@ class Request { |
| */ |
| factory Request.fromString(String data) { |
| try { |
| - var result = DECODER.convert(data); |
| + dynamic result = DECODER.convert(data); |
|
Brian Wilkerson
2014/05/24 17:36:52
Hm. It might be better to leave 'var' in places wh
scheglov
2014/05/24 17:45:50
I rolled back places where we use "dynamic" type.
|
| if (result is! Map) { |
| return null; |
| } |
| - var id = result[Request.ID]; |
| - var method = result[Request.METHOD]; |
| + dynamic id = result[Request.ID]; |
| + dynamic method = result[Request.METHOD]; |
| if (id is! String || method is! String) { |
| return null; |
| } |
| - var params = result[Request.PARAMS]; |
| + dynamic params = result[Request.PARAMS]; |
| Request request = new Request(id, method); |
| if (params is Map) { |
| params.forEach((String key, Object value) { |
| @@ -263,7 +263,7 @@ class RequestDatum { |
| if (datum is! List) { |
| return false; |
| } |
| - for (var element in datum) { |
| + for (dynamic element in datum) { |
| if (element is! String) { |
| return false; |
| } |
| @@ -292,7 +292,7 @@ class RequestDatum { |
| if (datum is! Map) { |
| return false; |
| } |
| - for (var value in datum.values) { |
| + for (dynamic value in datum.values) { |
| if (value is! String) { |
| return false; |
| } |
| @@ -412,12 +412,12 @@ class Response { |
| */ |
| factory Response.fromJson(Map<String, Object> json) { |
| try { |
| - var id = json[Response.ID]; |
| + Object id = json[Response.ID]; |
| if (id is! String) { |
| return null; |
| } |
| - var error = json[Response.ERROR]; |
| - var result = json[Response.RESULT]; |
| + Object error = json[Response.ERROR]; |
| + Object result = json[Response.RESULT]; |
| Response response; |
| if (error is Map) { |
| response = new Response(id, new RequestError.fromJson(error)); |
| @@ -674,7 +674,7 @@ class Notification { |
| factory Notification.fromJson(Map<String, Object> json) { |
| try { |
| String event = json[Notification.EVENT]; |
| - var params = json[Notification.PARAMS]; |
| + Object params = json[Notification.PARAMS]; |
| Notification notification = new Notification(event); |
| if (params is Map) { |
| params.forEach((String key, Object value) { |