diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-05-13 10:01:13 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-05-13 10:01:13 +0200 |
commit | 27aa656e1f6031e54f004c9f91d7919f3cb79722 (patch) | |
tree | a92a1f3787dc33fee29481ede7c998dd486fee0d /sonar-core | |
parent | 618a3af602f872b99aaaec3ef7b21510e36b45b0 (diff) | |
download | sonarqube-27aa656e1f6031e54f004c9f91d7919f3cb79722.tar.gz sonarqube-27aa656e1f6031e54f004c9f91d7919f3cb79722.zip |
SONAR-7545 use ComponentKeys.MAX_COMPONENT_KEY_LENGTH
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java | 6 |
1 files changed, 3 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 64b7c7fa05f..defab7e80a0 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 @@ -28,7 +28,7 @@ import org.sonar.api.resources.Scopes; public final class ComponentKeys { - public static final int COMPONENT_KEY_SIZE = 400; + public static final int MAX_COMPONENT_KEY_LENGTH = 400; /* * Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit @@ -54,7 +54,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(COMPONENT_KEY_SIZE) + key = new StringBuilder(MAX_COMPONENT_KEY_LENGTH) .append(project.getKey()) .append(':') .append(resource.getKey()) @@ -68,7 +68,7 @@ public final class ComponentKeys { } public static String createEffectiveKey(String moduleKey, @Nullable String path) { - StringBuilder sb = new StringBuilder(COMPONENT_KEY_SIZE); + StringBuilder sb = new StringBuilder(MAX_COMPONENT_KEY_LENGTH); sb.append(moduleKey); if (path != null) { sb.append(':').append(path); |