aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-05-21 15:38:15 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-05-21 15:38:15 +0200
commitc1211d5b9f0674832f8a33da9f0f2c3bf66ff146 (patch)
tree188fd6079de0c05ee985a7f73aa5d5e6b9e18ae8 /sonar-plugin-api/src
parent2801f02b86920a00d51e8d94e8c196f637e5ac14 (diff)
downloadsonarqube-c1211d5b9f0674832f8a33da9f0f2c3bf66ff146.tar.gz
sonarqube-c1211d5b9f0674832f8a33da9f0f2c3bf66ff146.zip
Revert "SONAR-4301 Replace issues.severity column type from String to Integer"
This reverts commit 2c2728075a1c142965bf6c018ba94919955f80d8.
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java28
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java1
2 files changed, 0 insertions, 29 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
index 946b71bdbb2..4a74dedf0fb 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
@@ -19,13 +19,9 @@
*/
package org.sonar.api.issue;
-import com.google.common.base.Function;
import com.google.common.base.Preconditions;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.sonar.api.rule.RuleKey;
-import org.sonar.api.rule.Severity;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
@@ -33,8 +29,6 @@ import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Date;
-import static com.google.common.collect.Lists.newArrayList;
-
/**
* @since 3.6
*/
@@ -74,9 +68,6 @@ public class IssueQuery {
// index of selected page. Start with 1.
private final int pageIndex;
- // for internal use in MyBatis
- protected final Collection<Integer> severitiesIndexSql;
-
private IssueQuery(Builder builder) {
this.issueKeys = builder.issueKeys;
this.severities = builder.severities;
@@ -98,8 +89,6 @@ public class IssueQuery {
this.pageSize = builder.pageSize;
this.pageIndex = builder.pageIndex;
this.requiredRole = builder.requiredRole;
-
- this.severitiesIndexSql = severitiesIndexSql(severities);
}
public Collection<String> issueKeys() {
@@ -192,23 +181,6 @@ public class IssueQuery {
return new Builder();
}
- private Collection<Integer> severitiesIndexSql(@Nullable Collection<String> severities) {
- if (severities != null) {
- return newArrayList(Iterables.transform(severities, new Function<String, Integer>() {
- @Override
- public Integer apply(final String currentSeverity) {
- return Iterables.indexOf(Severity.ALL, new Predicate<String>() {
- @Override
- public boolean apply(String severity) {
- return severity.equals(currentSeverity);
- }
- }) + 1;
- };
- }));
- }
- return null;
- }
-
public static class Builder {
private Collection<String> issueKeys;
private Collection<String> severities;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java
index 938c5ff56f9..fb972c40cee 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java
@@ -71,7 +71,6 @@ public class IssueQueryTest {
assertThat(query.pageSize()).isEqualTo(10);
assertThat(query.pageIndex()).isEqualTo(2);
assertThat(query.requiredRole()).isEqualTo(UserRole.CODEVIEWER);
- assertThat(query.severitiesIndexSql).containsOnly(5);
}
@Test