diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-22 19:42:42 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-22 19:42:42 +0100 |
commit | 6e9accbad15f8485f8860a8afbb525c4a04dd278 (patch) | |
tree | 5cea3ba0a73a7c528ade1c65e263a3fee2d80b88 /server | |
parent | d88d443bbe5c5dabe45b44760108fa7b506cd7d9 (diff) | |
download | sonarqube-6e9accbad15f8485f8860a8afbb525c4a04dd278.tar.gz sonarqube-6e9accbad15f8485f8860a8afbb525c4a04dd278.zip |
Fix quality flaws
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java | 22 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/issue/ws/ShowActionTest.java | 2 |
2 files changed, 0 insertions, 24 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java b/server/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java index 1df20276b18..ff69e9c0f22 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java @@ -19,7 +19,6 @@ */ package org.sonar.server.debt; -import com.google.common.collect.Ordering; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; @@ -39,7 +38,6 @@ import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.sonar.api.rule.RuleKey; import org.sonar.api.server.ServerSide; -import org.sonar.api.server.debt.DebtCharacteristic; import org.xml.sax.InputSource; /** @@ -199,24 +197,4 @@ public class DebtModelXMLExporter { '}'; } } - - private static class SortByOrder extends Ordering<DebtCharacteristic> { - @Override - public int compare(@Nullable DebtCharacteristic left, @Nullable DebtCharacteristic right) { - if (left == null || left.order() == null || right == null || right.order() == null) { - return -1; - } - return left.order() - right.order(); - } - } - - private static class SortByName extends Ordering<DebtCharacteristic> { - @Override - public int compare(@Nullable DebtCharacteristic left, @Nullable DebtCharacteristic right) { - if (left == null || right == null) { - return -1; - } - return StringUtils.defaultString(left.name()).compareTo(StringUtils.defaultString(right.name())); - } - } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ShowActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ShowActionTest.java index 8c3cf8fab17..973defab5c9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ShowActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ShowActionTest.java @@ -32,7 +32,6 @@ import org.mockito.runners.MockitoJUnitRunner; import org.sonar.api.i18n.I18n; import org.sonar.api.issue.Issue; import org.sonar.api.rule.RuleKey; -import org.sonar.api.server.debt.internal.DefaultDebtCharacteristic; import org.sonar.api.user.User; import org.sonar.api.user.UserFinder; import org.sonar.api.utils.DateUtils; @@ -49,7 +48,6 @@ import org.sonar.db.DbSession; import org.sonar.db.component.ComponentDao; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; -import org.sonar.server.debt.DebtModelService; import org.sonar.server.issue.ActionService; import org.sonar.server.issue.IssueChangelog; import org.sonar.server.issue.IssueChangelogService; |