[Gradle] Dependencies graph: cleanup IDEA-218166
authorVladislav.Soroka <Vladislav.Soroka@jetbrains.com>
Thu, 9 Jan 2020 15:34:59 +0000 (18:34 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 22 Jan 2020 18:07:02 +0000 (18:07 +0000)
GitOrigin-RevId: ad23f1209c1921625ba0901d31adcb73205997b3

platform/external-system-rt/src/com/intellij/openapi/externalSystem/model/project/dependencies/UnknownDependencyNode.java
plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/tasks/DependencyNodeDeserializer.java

index 058c06a50644e2121c528c2d020bb183ea35fd5b..47fa496d35270b80c3bda85bcd40c411dd97d0f1 100644 (file)
@@ -16,6 +16,6 @@ public class UnknownDependencyNode extends AbstractDependencyNode {
   @NotNull
   @Override
   public String getDisplayName() {
-    return name;
+    return name == null ? "unknown" : name;
   }
 }
index a57ce5d3d2b56ab2e24428e7c34da1d5b51b7ff7..77ab7568019a8a9c2fc1348231247d35311105c0 100644 (file)
@@ -11,10 +11,10 @@ public class DependencyNodeDeserializer implements JsonDeserializer<DependencyNo
   @Override
   public DependencyNode deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
     JsonObject jsonObject = json.getAsJsonObject();
-    if (jsonObject.get("configurationName") != null) {
+    if (jsonObject.get("scope") != null) {
       return context.deserialize(json, DependencyScopeNode.class);
     }
-    else if (jsonObject.get("projectPath") != null) {
+    else if (jsonObject.get("projectName") != null) {
       return context.deserialize(json, ProjectDependencyNodeImpl.class);
     }
     else if (jsonObject.get("module") != null) {