]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-926 Fix regression after renaming of InputFile type SOURCE => MAIN
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 27 Jan 2014 15:43:10 +0000 (16:43 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 27 Jan 2014 15:43:48 +0000 (16:43 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileType.java

index c29b31683b6c243de9b77c95afff587966fae70c..e8d05fe14d04e47d37c70f2b8fee276517f49c82 100644 (file)
@@ -50,7 +50,7 @@ public class FileQuery {
   public static FileQuery on(FileType... types) {
     FileQuery query = new FileQuery();
     for (FileType type : types) {
-      query.on(InputFile.ATTRIBUTE_TYPE, type.name());
+      query.on(InputFile.ATTRIBUTE_TYPE, type.typeValue());
     }
     return query;
   }
index 31e5581db1853c569f44d43459da4f121cd97007..6754503a9f864a060f52898e0e86eb181c2a8aa4 100644 (file)
@@ -25,5 +25,15 @@ package org.sonar.api.scan.filesystem;
  */
 @Deprecated
 public enum FileType {
-  SOURCE, TEST
+  SOURCE(InputFile.TYPE_MAIN), TEST(InputFile.TYPE_TEST);
+
+  private String typeValue;
+
+  private FileType(String typeValue) {
+    this.typeValue = typeValue;
+  }
+
+  String typeValue() {
+    return typeValue;
+  }
 }