]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-926 remove remaining usages of deprecated qualifiers
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Feb 2014 15:32:25 +0000 (16:32 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Feb 2014 15:32:25 +0000 (16:32 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/DefaultResourceTypes.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/DefaultResourceTypesTest.java
sonar-batch/src/main/java/org/sonar/batch/source/HighlightableBuilder.java

index 2386030a5b946d66da694b288876a97ae69c08df..c331932594d821a3f46b10dfb0df2199946de24e 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.api.resources.ResourceTypeTree;
 public final class DefaultResourceTypes extends ExtensionProvider implements BatchExtension, ServerExtension {
 
   private static final String SUPPORTS_MEASURE_FILTERS = "supportsMeasureFilters";
-  private static final String CONFIGURABLE = "configurable";;
+  private static final String CONFIGURABLE = "configurable";
   private static final String UPDATABLE_KEY = "updatable_key";
 
   @Override
@@ -56,15 +56,10 @@ public final class DefaultResourceTypes extends ExtensionProvider implements Bat
         .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)
@@ -73,7 +68,6 @@ public final class DefaultResourceTypes extends ExtensionProvider implements Bat
         .addRelations(Qualifiers.PROJECT, Qualifiers.MODULE)
         .addRelations(Qualifiers.MODULE, Qualifiers.DIRECTORY, Qualifiers.PACKAGE)
         .addRelations(Qualifiers.DIRECTORY, Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE)
-        .addRelations(Qualifiers.PACKAGE, Qualifiers.CLASS, Qualifiers.UNIT_TEST_FILE)
 
         .build();
   }
index 4862afe60c360453a456acb048e9c611245f543e..c7feb8b2bc361df16104fa6f164a627798638512 100644 (file)
@@ -29,10 +29,10 @@ import static org.fest.assertions.Assertions.assertThat;
 
 public class DefaultResourceTypesTest {
   @Test
-  public void should_provide() {
+  public void provide_types() {
     ResourceTypeTree tree = new DefaultResourceTypes().provide();
 
-    assertThat(tree.getTypes()).hasSize(7);
+    assertThat(tree.getTypes()).hasSize(5);
     assertThat(tree.getChildren(Qualifiers.PROJECT)).containsExactly(Qualifiers.MODULE);
   }
 
index 34e510525dfa25d1d76783f8807f42fc252c4af8..a9b1a9bd0586a3a37aad964479add4e36c39d89e 100644 (file)
@@ -36,7 +36,7 @@ import java.util.Set;
  */
 public class HighlightableBuilder extends PerspectiveBuilder<Highlightable> {
 
-  private static final Set<String> SUPPORTED_QUALIFIERS = ImmutableSet.of(Qualifiers.FILE, Qualifiers.CLASS, Qualifiers.UNIT_TEST_FILE);
+  private static final Set<String> SUPPORTED_QUALIFIERS = ImmutableSet.of(Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE);
   private final ComponentDataCache cache;
 
   public HighlightableBuilder(ComponentDataCache cache) {