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

Unified Diff: pkg/analysis_server/lib/plugin/protocol/protocol.dart

Issue 1852473002: Fix generated server code to be strong mode compliant (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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: pkg/analysis_server/lib/plugin/protocol/protocol.dart
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol.dart b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
index 9daa9f05583ecf684d85ab7c79e9439e69c606f0..0708c3bd47c97b74bff14725ff0909adcadb4021 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
@@ -87,8 +87,8 @@ class Notification {
* Initialize a newly created instance based on the given JSON data.
*/
factory Notification.fromJson(Map<String, Object> json) {
- return new Notification(
- json[Notification.EVENT], json[Notification.PARAMS]);
+ return new Notification(json[Notification.EVENT],
+ json[Notification.PARAMS] as Map<String, Object>);
}
/**
@@ -194,7 +194,7 @@ class Request {
}
var params = result[Request.PARAMS];
if (params is Map || params == null) {
- return new Request(id, method, params, time);
+ return new Request(id, method, params as Map<String, Object>, time);
} else {
return null;
}
@@ -224,7 +224,7 @@ class Request {
try {
var result = JSON.decode(data);
if (result is Map) {
- return new Request.fromJson(result);
+ return new Request.fromJson(result as Map<String, dynamic>);
}
return null;
} catch (exception) {
@@ -383,7 +383,7 @@ class Response {
Object result = json[Response.RESULT];
Map<String, Object> decodedResult;
if (result is Map) {
- decodedResult = result;
+ decodedResult = result as Map<String, Object>;
}
return new Response(id, error: decodedError, result: decodedResult);
} catch (exception) {

Powered by Google App Engine
This is Rietveld 408576698