diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2018-07-06 12:42:09 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-07-17 20:21:24 +0200 |
commit | 4c237919e3c72aa0a62a27b4587825944bc81ee9 (patch) | |
tree | ab2d6c2da20b7df67e53a4d916645d3a68126dca /server/sonar-server-common/src | |
parent | e5d4ef578a9cab0d6ee6049e8207ab2e988f8eda (diff) | |
download | sonarqube-4c237919e3c72aa0a62a27b4587825944bc81ee9.tar.gz sonarqube-4c237919e3c72aa0a62a27b4587825944bc81ee9.zip |
Move SANS_TOP_25_* constants to sonar-server-common
Diffstat (limited to 'server/sonar-server-common/src')
3 files changed, 11 insertions, 6 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/IssueQuery.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/IssueQuery.java index 86b3400e411..23e28bfd249 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/IssueQuery.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/IssueQuery.java @@ -57,6 +57,11 @@ public class IssueQuery { public static final Set<String> SORTS = ImmutableSet.of(SORT_BY_CREATION_DATE, SORT_BY_UPDATE_DATE, SORT_BY_CLOSE_DATE, SORT_BY_ASSIGNEE, SORT_BY_SEVERITY, SORT_BY_STATUS, SORT_BY_FILE_LINE); + public static final String UNKNOWN_STANDARD = "unknown"; + public static final String SANS_TOP_25_INSECURE_INTERACTION = "insecure-interaction"; + public static final String SANS_TOP_25_RISKY_RESOURCE = "risky-resource"; + public static final String SANS_TOP_25_POROUS_DEFENSES = "porous-defenses"; + private final Collection<String> issueKeys; private final Collection<String> severities; private final Collection<String> statuses; diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIteratorForSingleChunk.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIteratorForSingleChunk.java index e2fd803ba2c..549974561f8 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIteratorForSingleChunk.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIteratorForSingleChunk.java @@ -50,10 +50,10 @@ import static java.util.Arrays.asList; import static java.util.stream.Collectors.toList; import static org.sonar.api.utils.DateUtils.longToDate; import static org.sonar.db.DatabaseUtils.getLong; -import static org.sonar.server.issue.ws.SearchAction.SANS_TOP_25_INSECURE_INTERACTION; -import static org.sonar.server.issue.ws.SearchAction.SANS_TOP_25_POROUS_DEFENSES; -import static org.sonar.server.issue.ws.SearchAction.SANS_TOP_25_RISKY_RESOURCE; -import static org.sonar.server.issue.ws.SearchAction.UNKNOWN_STANDARD; +import static org.sonar.server.issue.IssueQuery.SANS_TOP_25_INSECURE_INTERACTION; +import static org.sonar.server.issue.IssueQuery.SANS_TOP_25_POROUS_DEFENSES; +import static org.sonar.server.issue.IssueQuery.SANS_TOP_25_RISKY_RESOURCE; +import static org.sonar.server.issue.IssueQuery.UNKNOWN_STANDARD; /** * Scrolls over table ISSUES and reads documents to populate diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java index 1b5310ca460..0d9fc391d8b 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java @@ -56,9 +56,9 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.rules.ExpectedException.none; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.server.issue.IssueDocTesting.newDoc; +import static org.sonar.server.issue.IssueQuery.SANS_TOP_25_POROUS_DEFENSES; +import static org.sonar.server.issue.IssueQuery.UNKNOWN_STANDARD; import static org.sonar.server.issue.index.IssueIndexDefinition.INDEX_TYPE_ISSUE; -import static org.sonar.server.issue.ws.SearchAction.SANS_TOP_25_POROUS_DEFENSES; -import static org.sonar.server.issue.ws.SearchAction.UNKNOWN_STANDARD; import static org.sonar.server.permission.index.AuthorizationTypeSupport.TYPE_AUTHORIZATION; public class IssueIndexerTest { |