From 27aa656e1f6031e54f004c9f91d7919f3cb79722 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 13 May 2016 10:01:13 +0200 Subject: SONAR-7545 use ComponentKeys.MAX_COMPONENT_KEY_LENGTH --- .../src/main/java/org/sonar/core/component/ComponentKeys.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sonar-core') 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); -- cgit v1.2.3