diff options
Diffstat (limited to 'server/sonar-server-common')
5 files changed, 7 insertions, 19 deletions
diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java index 04ef41b80c0..e84e702cdd3 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java @@ -25,7 +25,6 @@ import java.util.stream.IntStream; import org.junit.Rule; import org.junit.Test; import org.sonar.api.utils.DateUtils; -import org.sonar.api.utils.Durations; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.issue.IssueDto; @@ -57,7 +56,7 @@ public class NewIssuesNotificationIT { public DbTester db = DbTester.create(); private DetailsSupplier detailsSupplier = mock(DetailsSupplier.class); - private NewIssuesNotification underTest = new NewIssuesNotification(new Durations(), detailsSupplier); + private NewIssuesNotification underTest = new NewIssuesNotification(detailsSupplier); @Test public void set_project_without_branch() { diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java index e064f847ca1..5da81f47a87 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java @@ -22,7 +22,6 @@ package org.sonar.server.issue.notification; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Date; -import java.util.Locale; import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.sonar.api.config.EmailSettings; @@ -193,9 +192,4 @@ public abstract class AbstractNewIssuesEmailTemplate implements EmailTemplate { .append(NEW_LINE); } } - - private static Locale getLocale() { - return Locale.ENGLISH; - } - } diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java index 5191ff514dc..e18053690f0 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java @@ -21,7 +21,6 @@ package org.sonar.server.issue.notification; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.utils.Durations; import org.sonar.db.user.UserDto; import static org.sonar.server.issue.notification.AbstractNewIssuesEmailTemplate.FIELD_ASSIGNEE; @@ -30,8 +29,8 @@ public class MyNewIssuesNotification extends NewIssuesNotification { public static final String MY_NEW_ISSUES_NOTIF_TYPE = "my-new-issues"; - public MyNewIssuesNotification(Durations durations, DetailsSupplier detailsSupplier) { - super(MY_NEW_ISSUES_NOTIF_TYPE, durations, detailsSupplier); + public MyNewIssuesNotification(DetailsSupplier detailsSupplier) { + super(MY_NEW_ISSUES_NOTIF_TYPE, detailsSupplier); } public MyNewIssuesNotification setAssignee(@Nullable UserDto assignee) { diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java index 3b7858bf3ef..91513e8f60d 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java @@ -30,7 +30,6 @@ import javax.annotation.Nullable; import org.sonar.api.notifications.Notification; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.DateUtils; -import org.sonar.api.utils.Durations; import org.sonar.server.issue.notification.NewIssuesStatistics.Metric; import static java.util.Objects.requireNonNull; @@ -51,15 +50,13 @@ public class NewIssuesNotification extends Notification { private static final String DOT = "."; private final transient DetailsSupplier detailsSupplier; - private final transient Durations durations; - public NewIssuesNotification(Durations durations, DetailsSupplier detailsSupplier) { - this(TYPE, durations, detailsSupplier); + public NewIssuesNotification(DetailsSupplier detailsSupplier) { + this(TYPE, detailsSupplier); } - protected NewIssuesNotification(String type, Durations durations, DetailsSupplier detailsSupplier) { + protected NewIssuesNotification(String type, DetailsSupplier detailsSupplier) { super(type); - this.durations = durations; this.detailsSupplier = detailsSupplier; } diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationTest.java index 451ad8ffb59..a746b3b61e8 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationTest.java @@ -20,7 +20,6 @@ package org.sonar.server.issue.notification; import org.junit.Test; -import org.sonar.api.utils.Durations; import org.sonar.db.user.UserDto; import org.sonar.db.user.UserTesting; import org.sonar.server.issue.notification.NewIssuesNotification.DetailsSupplier; @@ -31,7 +30,7 @@ import static org.sonar.server.issue.notification.AbstractNewIssuesEmailTemplate public class MyNewIssuesNotificationTest { - private MyNewIssuesNotification underTest = new MyNewIssuesNotification(mock(Durations.class), mock(DetailsSupplier.class)); + private MyNewIssuesNotification underTest = new MyNewIssuesNotification(mock(DetailsSupplier.class)); @Test public void set_assignee() { |