From 3a66a1155cc44e22e1d49e310e30d0e421f90e8a Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 1 Aug 2017 13:59:26 +0200 Subject: [PATCH] ComponentDto does not inherit anymore from Component --- .../main/java/org/sonar/db/component/ComponentDto.java | 8 +------- .../issue/notification/IssueChangeNotification.java | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java index 87385285a86..48fb43c7e5a 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java @@ -28,7 +28,6 @@ import java.util.List; import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.apache.commons.lang.builder.ToStringBuilder; -import org.sonar.api.component.Component; import org.sonar.api.resources.Scopes; import static com.google.common.base.Preconditions.checkArgument; @@ -36,7 +35,7 @@ import static org.sonar.db.component.ComponentValidator.checkComponentKey; import static org.sonar.db.component.ComponentValidator.checkComponentName; import static org.sonar.db.component.DbTagsReader.readDbTags; -public class ComponentDto implements Component { +public class ComponentDto { public static final String UUID_PATH_SEPARATOR = "."; public static final String UUID_PATH_OF_ROOT = UUID_PATH_SEPARATOR; @@ -174,7 +173,6 @@ public class ComponentDto implements Component { return UUID_PATH_SPLITTER.splitToList(uuidPath); } - @Override public String key() { return kee; } @@ -188,7 +186,6 @@ public class ComponentDto implements Component { return this; } - @Override public String qualifier() { return qualifier; } @@ -250,7 +247,6 @@ public class ComponentDto implements Component { } @CheckForNull - @Override public String path() { return path; } @@ -260,7 +256,6 @@ public class ComponentDto implements Component { return this; } - @Override public String name() { return name; } @@ -270,7 +265,6 @@ public class ComponentDto implements Component { return this; } - @Override public String longName() { return longName; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/IssueChangeNotification.java b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/IssueChangeNotification.java index b7d571ba95a..43a66e25b9f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/IssueChangeNotification.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/IssueChangeNotification.java @@ -24,10 +24,10 @@ import java.io.Serializable; import java.util.Map; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.component.Component; import org.sonar.api.notifications.Notification; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.FieldDiffs; +import org.sonar.db.component.ComponentDto; public class IssueChangeNotification extends Notification { @@ -54,7 +54,7 @@ public class IssueChangeNotification extends Notification { return this; } - public IssueChangeNotification setProject(Component project) { + public IssueChangeNotification setProject(ComponentDto project) { setFieldValue("projectName", project.longName()); setFieldValue("projectKey", project.key()); return this; @@ -66,7 +66,7 @@ public class IssueChangeNotification extends Notification { return this; } - public IssueChangeNotification setComponent(Component component) { + public IssueChangeNotification setComponent(ComponentDto component) { setFieldValue("componentName", component.longName()); return this; } -- 2.39.5