aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-11-07 14:00:25 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-11-07 14:00:56 +0100
commitefc6da2339a20d10756f821980b5cd907e28acef (patch)
tree2580affe46b262c0ced22a9b7fdb29ea3be2f622 /sonar-batch
parent677d7ffda6bcc6ce52fe1bc6f4782396dd4bf3b9 (diff)
downloadsonarqube-efc6da2339a20d10756f821980b5cd907e28acef.tar.gz
sonarqube-efc6da2339a20d10756f821980b5cd907e28acef.zip
Revert SONAR-3922
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.java15
2 files changed, 2 insertions, 17 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 c4faf1517d9..751508ea40b 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." + project.getLanguageKey()),
- settings.getString("sonar.profile")
+ settings.getString("sonar.profile"),
+ settings.getString("sonar.profile." + project.getLanguageKey())
);
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 8a7df9cb578..410e8032ac7 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultProfileLoaderTest.java
@@ -59,21 +59,6 @@ public class DefaultProfileLoaderTest {
assertThat(profile.getName()).isEqualTo("legacy profile");
}
- /**
- * SONAR-3922
- */
- @Test
- public void should_check_language_property_before_global_property() {
- Settings settings = new Settings();
- settings.setProperty("sonar.profile.java", "one");
- settings.setProperty("sonar.profile", "two");
- when(dao.getProfile(Java.KEY, "one")).thenReturn(RulesProfile.create("one", "java"));
-
- RulesProfile profile = new DefaultProfileLoader(dao, settings).load(javaProject);
-
- assertThat(profile.getName()).isEqualTo("one");
- }
-
@Test
public void should_fail_if_not_found() {
Settings settings = new Settings();