| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ErrorFixes.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ErrorFixes.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ErrorFixes.java
|
| index 1fd161993b15beedf6d796c679d13b8a3fff2974..1ab24c3ad2e7a6b0b7e1aa5fb40fc16dbc7ca134 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ErrorFixes.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ErrorFixes.java
|
| @@ -73,7 +73,7 @@ public class ErrorFixes {
|
|
|
| public static ErrorFixes fromJson(JsonObject jsonObject) {
|
| AnalysisError error = AnalysisError.fromJson(jsonObject.get("error").getAsJsonObject());
|
| - List<SourceChange> fixes = SourceChange.fromJsonArray(jsonObject.get("fixes").getAsJsonArray());
|
| + List<SourceChange> fixes = jsonObject.get("fixes") == null ? null : SourceChange.fromJsonArray(jsonObject.get("fixes").getAsJsonArray());
|
| return new ErrorFixes(error, fixes);
|
| }
|
|
|
| @@ -106,11 +106,13 @@ public class ErrorFixes {
|
| public JsonObject toJson() {
|
| JsonObject jsonObject = new JsonObject();
|
| jsonObject.add("error", error.toJson());
|
| - JsonArray jsonArrayFixes = new JsonArray();
|
| - for(SourceChange elt : fixes) {
|
| - jsonArrayFixes.add(elt.toJson());
|
| + if (fixes != null) {
|
| + JsonArray jsonArrayFixes = new JsonArray();
|
| + for(SourceChange elt : fixes) {
|
| + jsonArrayFixes.add(elt.toJson());
|
| + }
|
| + jsonObject.add("fixes", jsonArrayFixes);
|
| }
|
| - jsonObject.add("fixes", jsonArrayFixes);
|
| return jsonObject;
|
| }
|
|
|
|
|