]> source.dussan.org Git - sonarqube.git/commitdiff
'sonar.profile.<language_key>' should take precedence over 'sonar.profile'
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 7 Nov 2012 10:16:32 +0000 (11:16 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 7 Nov 2012 10:16:32 +0000 (11:16 +0100)
sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java

index 751508ea40b57f6a58cf887783b5e8af71cab9a9..c4faf1517d957a8300d606577a0e8bbe2d6f6853 100644 (file)
@@ -38,8 +38,8 @@ public class DefaultProfileLoader implements ProfileLoader {
 
   public RulesProfile load(Project project) {
     String profileName = StringUtils.defaultIfBlank(
-      settings.getString("sonar.profile"),
-      settings.getString("sonar.profile." + project.getLanguageKey())
+      settings.getString("sonar.profile." + project.getLanguageKey()),
+      settings.getString("sonar.profile")
     );
 
     if (StringUtils.isBlank(profileName)) {
index e47507942361e8843318b2fc603a75e9419e6dfe..8a7df9cb578cbc119039163d4184df4b2e5e9c66 100644 (file)
@@ -21,7 +21,6 @@ package org.sonar.batch;
 
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -64,7 +63,6 @@ public class DefaultProfileLoaderTest {
    * SONAR-3922
    */
   @Test
-  @Ignore
   public void should_check_language_property_before_global_property() {
     Settings settings = new Settings();
     settings.setProperty("sonar.profile.java", "one");