aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java4
-rw-r--r--sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml2
5 files changed, 7 insertions, 7 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java b/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java
index 64bdab89615..75184134fb0 100644
--- a/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java
+++ b/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java
@@ -57,14 +57,14 @@ public final class EnableProfiles {
private void enableProfilesOnKnownLanguages(Set<String> languages, DatabaseSession session) {
Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language in (:languages)");
- query.setParameter("enabled", true);
+ query.setParameter("enabled", Boolean.TRUE);
query.setParameter("languages", languages);
query.executeUpdate();
}
private void disableProfilesOnMissingLanguages(Set<String> languages, DatabaseSession session) {
Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language not in (:languages)");
- query.setParameter("enabled", false);
+ query.setParameter("enabled", Boolean.FALSE);
query.setParameter("languages", languages);
query.executeUpdate();
}
diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java
index 7d25cc57208..43cc7ccc162 100644
--- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java
+++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java
@@ -32,7 +32,6 @@ import org.sonar.jpa.dao.MeasuresDao;
import org.sonar.server.platform.ServerStartException;
import javax.persistence.Query;
-
import java.util.List;
import java.util.Map;
@@ -86,7 +85,8 @@ public class RegisterMetrics {
Query query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric))");
query.executeUpdate();
- query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=true))");
+ query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=:enabled))");
+ query.setParameter("enabled", Boolean.TRUE);
query.executeUpdate();
session.commit();
}
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
index e85839686b3..3194d9dd51b 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
@@ -1,6 +1,6 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="[null]"/>
+ <rules_categories id="1" name="Efficiency" description="Efficiency"/>
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]" />
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
index cd931c60c73..476d3ca0262 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
@@ -1,6 +1,6 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="[null]"/>
+ <rules_categories id="1" name="Efficiency" description="Efficiency"/>
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
index fca8cf64b12..448089b94bf 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
@@ -1,6 +1,6 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="[null]"/>
+ <rules_categories id="1" name="Efficiency" description="Efficiency"/>
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]"/>