| Index: pkg/analysis_server/benchmark/integration/input_converter.dart
|
| diff --git a/pkg/analysis_server/benchmark/integration/input_converter.dart b/pkg/analysis_server/benchmark/integration/input_converter.dart
|
| index 2e941ffde16ad1e185c7ea9db80f243905c735f0..f61984515be36e7a4f2239e5e466bd9be82b584c 100644
|
| --- a/pkg/analysis_server/benchmark/integration/input_converter.dart
|
| +++ b/pkg/analysis_server/benchmark/integration/input_converter.dart
|
| @@ -72,6 +72,8 @@ abstract class CommonInputConverter extends Converter<String, Operation> {
|
|
|
| CommonInputConverter(this.tmpSrcDirPath, this.srcPathMap);
|
|
|
| + Map<String, dynamic> asMap(dynamic value) => value as Map<String, dynamic>;
|
| +
|
| /**
|
| * Return an operation for the notification or `null` if none.
|
| */
|
| @@ -79,9 +81,9 @@ abstract class CommonInputConverter extends Converter<String, Operation> {
|
| String event = json['event'];
|
| if (event == SERVER_STATUS) {
|
| // {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
|
| - Map<String, dynamic> params = json['params'];
|
| + Map<String, dynamic> params = asMap(json['params']);
|
| if (params != null) {
|
| - Map<String, dynamic> analysis = params['analysis'];
|
| + Map<String, dynamic> analysis = asMap(params['analysis']);
|
| if (analysis != null && analysis['isAnalyzing'] == false) {
|
| return new WaitForAnalysisCompleteOperation();
|
| }
|
| @@ -101,7 +103,7 @@ abstract class CommonInputConverter extends Converter<String, Operation> {
|
| * Return an operation for the request or `null` if none.
|
| */
|
| Operation convertRequest(Map<String, dynamic> origJson) {
|
| - Map<String, dynamic> json = translateSrcPaths(origJson);
|
| + Map<String, dynamic> json = asMap(translateSrcPaths(origJson));
|
| requestMap[json['id']] = json;
|
| String method = json['method'];
|
| // Sanity check operations that modify source
|
| @@ -172,8 +174,8 @@ abstract class CommonInputConverter extends Converter<String, Operation> {
|
| * Return an operation for the recorded/expected response.
|
| */
|
| Operation convertResponse(Map<String, dynamic> json) {
|
| - return new ResponseOperation(
|
| - this, requestMap.remove(json['id']), translateSrcPaths(json));
|
| + return new ResponseOperation(this, asMap(requestMap.remove(json['id'])),
|
| + asMap(translateSrcPaths(json)));
|
| }
|
|
|
| void logOverlayContent() {
|
|
|