diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-07-20 23:53:26 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-07-20 23:53:26 +0200 |
commit | 2e38406b37a89770bd4817a2e31b1d7fb4e0bbb2 (patch) | |
tree | f4430af7f8f7dc90c2d55600fe78425474e0c1cf /sonar-core | |
parent | 670a6f9def17dca3ab131a1930fc2dcec5dc438f (diff) | |
download | sonarqube-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.java | 7 |
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); |