| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java
|
| index 10712f2a1ca5d5e99abe0c8ffc6400b2e7521494..350eee4a567b9917798df9a6fe54391accaf6538 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java
|
| @@ -92,7 +92,7 @@ public class SearchResult {
|
| Location location = Location.fromJson(jsonObject.get("location").getAsJsonObject());
|
| String kind = jsonObject.get("kind").getAsString();
|
| Boolean isPotential = jsonObject.get("isPotential").getAsBoolean();
|
| - List<Element> path = Element.fromJsonArray(jsonObject.get("path").getAsJsonArray());
|
| + List<Element> path = jsonObject.get("path") == null ? null : Element.fromJsonArray(jsonObject.get("path").getAsJsonArray());
|
| return new SearchResult(location, kind, isPotential, path);
|
| }
|
|
|
| @@ -144,11 +144,13 @@ public class SearchResult {
|
| jsonObject.add("location", location.toJson());
|
| jsonObject.addProperty("kind", kind);
|
| jsonObject.addProperty("isPotential", isPotential);
|
| - JsonArray jsonArrayPath = new JsonArray();
|
| - for(Element elt : path) {
|
| - jsonArrayPath.add(elt.toJson());
|
| + if (path != null) {
|
| + JsonArray jsonArrayPath = new JsonArray();
|
| + for(Element elt : path) {
|
| + jsonArrayPath.add(elt.toJson());
|
| + }
|
| + jsonObject.add("path", jsonArrayPath);
|
| }
|
| - jsonObject.add("path", jsonArrayPath);
|
| return jsonObject;
|
| }
|
|
|
|
|