aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-20 23:53:26 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-20 23:53:26 +0200
commit2e38406b37a89770bd4817a2e31b1d7fb4e0bbb2 (patch)
treef4430af7f8f7dc90c2d55600fe78425474e0c1cf /sonar-core
parent670a6f9def17dca3ab131a1930fc2dcec5dc438f (diff)
downloadsonarqube-2e38406b37a89770bd4817a2e31b1d7fb4e0bbb2.tar.gz
sonarqube-2e38406b37a89770bd4817a2e31b1d7fb4e0bbb2.zip
Remove unused db classes Snapshot and ResourceModel
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java
index ad5856a6667..a427b165afb 100644
--- a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java
+++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java
@@ -22,13 +22,14 @@ package org.sonar.core.component;
import javax.annotation.Nullable;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.batch.fs.InputPath;
-import org.sonar.api.database.model.ResourceModel;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.resources.Scopes;
public final class ComponentKeys {
+ public static final int COMPONENT_KEY_SIZE = 400;
+
/*
* Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit
*/
@@ -51,7 +52,7 @@ public final class ComponentKeys {
String key = resource.getKey();
if (!StringUtils.equals(Scopes.PROJECT, resource.getScope())) {
// not a project nor a library
- key = new StringBuilder(ResourceModel.KEY_SIZE)
+ key = new StringBuilder(COMPONENT_KEY_SIZE)
.append(project.getKey())
.append(':')
.append(resource.getKey())
@@ -65,7 +66,7 @@ public final class ComponentKeys {
}
public static String createEffectiveKey(String moduleKey, @Nullable String path) {
- StringBuilder sb = new StringBuilder(ResourceModel.KEY_SIZE);
+ StringBuilder sb = new StringBuilder(COMPONENT_KEY_SIZE);
sb.append(moduleKey);
if (path != null) {
sb.append(':').append(path);