aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-11-07 11:16:32 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-11-07 11:16:32 +0100
commit2daa634f3432ec1ae861cb1ca684a16425f22686 (patch)
treea9545ba941575b328097ed02f4bc24db6a54bc38 /sonar-batch
parentbac1eab8188e496cf4c46dfcea08e74e63cebf1c (diff)
downloadsonarqube-2daa634f3432ec1ae861cb1ca684a16425f22686.tar.gz
sonarqube-2daa634f3432ec1ae861cb1ca684a16425f22686.zip
'sonar.profile.<language_key>' should take precedence over 'sonar.profile'
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java2
2 files changed, 2 insertions, 4 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
index 751508ea40b..c4faf1517d9 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
@@ -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)) {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java
index e4750794236..8a7df9cb578 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java
@@ -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");