summaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java13
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml1
-rw-r--r--sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java1
3 files changed, 1 insertions, 14 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 d8ba9b5c648..a17b51d22f3 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
@@ -55,19 +55,6 @@ public final class ComponentKeys {
return key;
}
- public static String createDeprecatedEffectiveKey(Project project, Resource resource) {
- String key = resource.getKey();
- if (!StringUtils.equals(Scopes.PROJECT, resource.getScope())) {
- // not a project nor a library
- key = new StringBuilder(ResourceModel.KEY_SIZE)
- .append(project.getKey())
- .append(':')
- .append(resource.getDeprecatedKey())
- .toString();
- }
- return key;
- }
-
/**
* <p>Test if given parameter is valid for a project/module. Valid format is:</p>
* <ul>
diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
index e2d0d0a4745..ef9389a5a27 100644
--- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
@@ -41,6 +41,7 @@
<resultMap id="resourceResultMap" type="Resource">
<id property="id" column="id"/>
<result property="key" column="kee"/>
+ <result property="deprecatedKey" column="deprecated_kee"/>
<result property="path" column="path"/>
<result property="name" column="name"/>
<result property="longName" column="long_name"/>
diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
index 42391a2cb2a..04b29175341 100644
--- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
@@ -35,7 +35,6 @@ public class ComponentKeysTest {
Directory dir = Directory.create("src/org/foo", "org/foo");
assertThat(ComponentKeys.createEffectiveKey(project, dir)).isEqualTo("my_project:src/org/foo");
- assertThat(ComponentKeys.createDeprecatedEffectiveKey(project, dir)).isEqualTo("my_project:org/foo");
Library library = new Library("junit:junit", "4.7");
assertThat(ComponentKeys.createEffectiveKey(project, library)).isEqualTo("junit:junit");