diff options
author | Julien HENRY <henryju@yahoo.fr> | 2016-07-04 11:58:10 +0200 |
---|---|---|
committer | Julien HENRY <henryju@yahoo.fr> | 2016-07-05 14:00:16 +0200 |
commit | 103f9ca40fe6c4864aa489119c1590e0449f1b9f (patch) | |
tree | a990c8be0e88b324307c2e3163559a42b1cfa0ac /sonar-core | |
parent | b7fcb4dd974df546cc13faa6be6529ca6bc26688 (diff) | |
download | sonarqube-103f9ca40fe6c4864aa489119c1590e0449f1b9f.tar.gz sonarqube-103f9ca40fe6c4864aa489119c1590e0449f1b9f.zip |
SONAR-7727 Remove deprecated stuff from Resources API
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java | 10 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/component/DefaultResourceTypesTest.java | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java b/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java index c23cf2bd596..03fe1f5d58f 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java +++ b/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java @@ -20,10 +20,10 @@ package org.sonar.core.component; import org.sonar.api.batch.ScannerSide; +import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceType; import org.sonar.api.resources.ResourceTypeTree; -import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @ScannerSide @@ -59,24 +59,18 @@ public final class DefaultResourceTypes { .addType(ResourceType.builder(Qualifiers.DIRECTORY) .setProperty(SUPPORTS_MEASURE_FILTERS, true) .build()) - .addType(ResourceType.builder(Qualifiers.PACKAGE) - .build()) .addType(ResourceType.builder(Qualifiers.FILE) .hasSourceCode() .setProperty(SUPPORTS_MEASURE_FILTERS, true) .build()) - .addType(ResourceType.builder(Qualifiers.CLASS) - .hasSourceCode() - .build()) .addType(ResourceType.builder(Qualifiers.UNIT_TEST_FILE) .hasSourceCode() .setProperty(SUPPORTS_MEASURE_FILTERS, true) .build()) .addRelations(Qualifiers.PROJECT, Qualifiers.MODULE) - .addRelations(Qualifiers.MODULE, Qualifiers.DIRECTORY, Qualifiers.PACKAGE) + .addRelations(Qualifiers.MODULE, Qualifiers.DIRECTORY) .addRelations(Qualifiers.DIRECTORY, Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE) - .addRelations(Qualifiers.PACKAGE, Qualifiers.CLASS, Qualifiers.UNIT_TEST_FILE) .build(); } diff --git a/sonar-core/src/test/java/org/sonar/core/component/DefaultResourceTypesTest.java b/sonar-core/src/test/java/org/sonar/core/component/DefaultResourceTypesTest.java index 801c84da141..8d1557b43fe 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/DefaultResourceTypesTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/DefaultResourceTypesTest.java @@ -31,7 +31,7 @@ public class DefaultResourceTypesTest { public void provide_types() { ResourceTypeTree tree = DefaultResourceTypes.get(); - assertThat(tree.getTypes()).hasSize(7); + assertThat(tree.getTypes()).hasSize(5); assertThat(tree.getChildren(Qualifiers.PROJECT)).containsExactly(Qualifiers.MODULE); } |