]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-926 fix duplicated items in ModuleLanguages
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Feb 2014 09:04:12 +0000 (10:04 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Feb 2014 09:04:12 +0000 (10:04 +0100)
sonar-batch/src/main/java/org/sonar/batch/scan/language/DefaultModuleLanguages.java

index 3922924a7fc0fac87e221b1bf4a01c89b111e8ff..8f5049ae62c77aefa87eae3c36b6e727a7659bdc 100644 (file)
@@ -19,7 +19,7 @@
  */
 package org.sonar.batch.scan.language;
 
-import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.CoreProperties;
@@ -30,7 +30,7 @@ import org.sonar.api.resources.Languages;
 import org.sonar.api.utils.MessageException;
 
 import java.util.Collection;
-import java.util.List;
+import java.util.Set;
 
 /**
  * Give access to all languages detected on the current module
@@ -41,7 +41,7 @@ public class DefaultModuleLanguages implements ModuleLanguages {
 
   private static final Logger LOG = LoggerFactory.getLogger(DefaultModuleLanguages.class);
 
-  private final List<String> moduleLanguages = Lists.newArrayList();
+  private final Set<String> moduleLanguages = Sets.newTreeSet();
 
   public DefaultModuleLanguages(Settings settings, Languages languages) {
     if (settings.hasKey(CoreProperties.PROJECT_LANGUAGE_PROPERTY)) {