aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-22 15:02:41 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-22 15:02:41 +0000
commit80554ac4be046afaac167a309e94c7c5f3cf3405 (patch)
tree3616c75a11a28d3cb7b677e24eb2885d618f3914 /sonar-server
parent7193aef67d64d8a58d62048745195ee12326c28a (diff)
downloadsonarqube-80554ac4be046afaac167a309e94c7c5f3cf3405.tar.gz
sonarqube-80554ac4be046afaac167a309e94c7c5f3cf3405.zip
SONAR-1722 increase the size of RULES_PROFILES.PARENT_NAME (same as NAME) + change the type of ACTIVE_RULES.INHERITANCE
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java14
-rw-r--r--sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java20
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb10
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb7
-rw-r--r--sonar-server/src/main/webapp/images/inherited.pngbin0 -> 510 bytes
-rw-r--r--sonar-server/src/main/webapp/images/overrides.pngbin0 -> 520 bytes
-rw-r--r--sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java9
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-restore-valid.xml3
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml3
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml2
20 files changed, 53 insertions, 55 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
index 2ca434ee7ee..854ef5c8594 100644
--- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
+++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
@@ -169,7 +169,7 @@ public class ProfilesBackup implements Backupable {
writeNode(writer, "key", rule.getRule().getKey());
writeNode(writer, "plugin", rule.getRule().getRepositoryKey());
writeNode(writer, "level", rule.getSeverity().name());
- writeNode(writer, "inherited", rule.getInheritanceStatus().toString());
+ writeNode(writer, "inheritance", rule.getInheritance());
if (!rule.getActiveRuleParams().isEmpty()) {
writer.startNode("params");
@@ -205,8 +205,8 @@ public class ProfilesBackup implements Backupable {
ActiveRule activeRule = new ActiveRule(null, new Rule(valuesRule.get("plugin"), valuesRule.get("key")), RulePriority
.valueOf(valuesRule.get("level")));
activeRule.setActiveRuleParams(params);
- if (valuesRule.containsKey("inherited")) {
- activeRule.setInheritanceStatus(ActiveRuleInheritanceStatus.valueOf(valuesRule.get("inherited")));
+ if (valuesRule.containsKey("inheritance")) {
+ activeRule.setInheritance(valuesRule.get("inheritance"));
}
return activeRule;
}
@@ -218,9 +218,11 @@ public class ProfilesBackup implements Backupable {
}
private void writeNode(HierarchicalStreamWriter writer, String name, String value) {
- writer.startNode(name);
- writer.setValue(value);
- writer.endNode();
+ if (value != null) {
+ writer.startNode(name);
+ writer.setValue(value);
+ writer.endNode();
+ }
}
private Map<String, String> readNode(HierarchicalStreamReader reader) {
diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
index a1ad040d321..98f1dc6ca76 100644
--- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
+++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
@@ -19,8 +19,6 @@
*/
package org.sonar.server.configuration;
-import org.sonar.api.rules.ActiveRuleInheritanceStatus;
-
import org.sonar.api.database.DatabaseSession;
import org.sonar.api.database.model.ResourceModel;
import org.sonar.api.profiles.RulesProfile;
@@ -122,8 +120,8 @@ public class ProfilesManager extends BaseDao {
*/
public void activatedOrChanged(int parentProfileId, int activeRuleId) {
ActiveRule parentActiveRule = getSession().getEntity(ActiveRule.class, activeRuleId);
- if (parentActiveRule.getInheritanceStatus() == ActiveRuleInheritanceStatus.INHERITED) {
- parentActiveRule.setInheritanceStatus(ActiveRuleInheritanceStatus.OVERRIDDEN);
+ if (parentActiveRule.isInherited()) {
+ parentActiveRule.setInheritance(ActiveRule.OVERRIDES);
getSession().saveWithoutFlush(parentActiveRule);
}
for (RulesProfile child : getChildren(parentProfileId)) {
@@ -159,12 +157,12 @@ public class ProfilesManager extends BaseDao {
public void revert(int profileId, int activeRuleId) {
RulesProfile profile = getSession().getEntity(RulesProfile.class, profileId);
ActiveRule activeRule = getSession().getEntity(ActiveRule.class, activeRuleId);
- if (activeRule != null && activeRule.getInheritanceStatus() == ActiveRuleInheritanceStatus.OVERRIDDEN) {
+ if (activeRule != null && activeRule.doesOverride()) {
ActiveRule parentActiveRule = getParentProfile(profile).getActiveRule(activeRule.getRule());
removeActiveRule(profile, activeRule);
activeRule = (ActiveRule) parentActiveRule.clone();
activeRule.setRulesProfile(profile);
- activeRule.setInheritanceStatus(ActiveRuleInheritanceStatus.INHERITED);
+ activeRule.setInheritance(ActiveRule.INHERITED);
profile.getActiveRules().add(activeRule);
getSession().saveWithoutFlush(activeRule);
@@ -179,17 +177,17 @@ public class ProfilesManager extends BaseDao {
private void activateOrChange(RulesProfile profile, ActiveRule parentActiveRule) {
ActiveRule activeRule = profile.getActiveRule(parentActiveRule.getRule());
if (activeRule != null) {
- if (activeRule.getInheritanceStatus() == ActiveRuleInheritanceStatus.INHERITED) {
+ if (activeRule.isInherited()) {
removeActiveRule(profile, activeRule);
} else {
- activeRule.setInheritanceStatus(ActiveRuleInheritanceStatus.OVERRIDDEN);
+ activeRule.setInheritance(ActiveRule.OVERRIDES);
getSession().saveWithoutFlush(activeRule);
return; // no need to change in children
}
}
activeRule = (ActiveRule) parentActiveRule.clone();
activeRule.setRulesProfile(profile);
- activeRule.setInheritanceStatus(ActiveRuleInheritanceStatus.INHERITED);
+ activeRule.setInheritance(ActiveRule.INHERITED);
profile.getActiveRules().add(activeRule);
getSession().saveWithoutFlush(activeRule);
@@ -201,10 +199,10 @@ public class ProfilesManager extends BaseDao {
private void deactivate(RulesProfile profile, Rule rule) {
ActiveRule activeRule = profile.getActiveRule(rule);
if (activeRule != null) {
- if (activeRule.getInheritanceStatus() == ActiveRuleInheritanceStatus.INHERITED) {
+ if (activeRule.isInherited()) {
removeActiveRule(profile, activeRule);
} else {
- activeRule.setInheritanceStatus(ActiveRuleInheritanceStatus.NO);
+ activeRule.setInheritance(null);
getSession().saveWithoutFlush(activeRule);
return; // no need to change in children
}
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb
index cc325a3ccbc..83bce7e376b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb
@@ -101,10 +101,10 @@ class ActiveRule < ActiveRecord::Base
end
def inherited?
- inherited==1
+ inheritance=='INHERITED'
end
- def overridden?
- inherited==2
+ def overrides?
+ inheritance=='OVERRIDES'
end
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb
index e5511c16196..52be4b10fcd 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb
@@ -14,15 +14,15 @@
:loading => "$('levels_#{rule.id}').replace('<img src=\"#{ApplicationController.root_context}/images/loading.gif\"/>');",
:with => "'level=' + get_level_for_rule(#{rule_select_box},#{rule_check_box})")
%>
- <%= check_box_tag(check_box_id, 'yes', (!active_rule.nil?), :onclick => activate_rule, :disabled => !enable_modification || (active_rule && (active_rule.inherited? || active_rule.overridden?))) %>
+ <%= check_box_tag(check_box_id, 'yes', (!active_rule.nil?), :onclick => activate_rule, :disabled => !enable_modification || (active_rule && (active_rule.inherited? || active_rule.overrides?))) %>
<%= select_tag(select_box_id, options_for_select(RulesConfigurationController::RULE_PRIORITIES, (active_rule.nil? ? rule.priority_text : active_rule.priority_text)),
{:onchange => changel_level, :disabled => (!(enable_modification) || active_rule.nil?)}) %>
<% if active_rule %>
<% if active_rule.inherited? %>
- <img src="<%= ApplicationController.root_context -%>/images/relation-vertical-green.png" alt="Inherited from parent" title="Inherited from parent"/>
- <% elsif active_rule.overridden? %>
- <img src="<%= ApplicationController.root_context -%>/images/relation-vertical-red.png" alt="Overrides parent definition" title="Overrides parent definition"/>
+ <img src="<%= ApplicationController.root_context -%>/images/inherited.png" alt="Inherited from parent" title="Inherited from parent"/>
+ <% elsif active_rule.overrides? %>
+ <img src="<%= ApplicationController.root_context -%>/images/overrides.png" alt="Overrides parent definition" title="Overrides parent definition"/>
<% end %>
<% end %>
</form>
@@ -56,7 +56,7 @@
<% if rule.editable? %>
<%= button_to "Edit rule", :action => 'edit', :id => profile.id, :rule_id => rule.id %>
<% end %>
- <% if active_rule && active_rule.overridden? %>
+ <% if active_rule && active_rule.overrides? %>
<%= button_to "Revert to parent definition", :action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id %><br/>
<% end %>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb
index c7b238473d9..62775358dde 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb
@@ -24,11 +24,10 @@
class AddColumnsForProfilesInheritance < ActiveRecord::Migration
def self.up
- add_column 'active_rules', 'inherited', :integer, :null => true
+ add_column 'active_rules', 'inheritance', :varchar, :limit => 10, :null => true
ActiveRule.reset_column_information
- ActiveRule.update_all(ActiveRule.sanitize_sql_for_assignment({:inherited => 0}))
-
- add_column 'rules_profiles', 'parent_name', :string, :limit => 40, :null => true
+
+ add_column 'rules_profiles', 'parent_name', :string, :limit => 100, :null => true
Profile.reset_column_information
end
diff --git a/sonar-server/src/main/webapp/images/inherited.png b/sonar-server/src/main/webapp/images/inherited.png
new file mode 100644
index 00000000000..e193d530e22
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/inherited.png
Binary files differ
diff --git a/sonar-server/src/main/webapp/images/overrides.png b/sonar-server/src/main/webapp/images/overrides.png
new file mode 100644
index 00000000000..35186694207
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/overrides.png
Binary files differ
diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java
index 0abc449a411..c6e72df8451 100644
--- a/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java
@@ -25,6 +25,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.CharEncoding;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
+import org.hamcrest.Matchers;
import org.junit.Test;
import org.sonar.api.database.DatabaseSession;
import org.sonar.api.database.configuration.Property;
@@ -128,7 +129,7 @@ public class BackupTest {
assertNotNull(testActiveRule.getRule());
assertEquals("test key", testActiveRule.getRule().getKey());
assertEquals("test plugin", testActiveRule.getRule().getRepositoryKey());
- assertThat(testActiveRule.getInheritanceStatus(), is(ActiveRuleInheritanceStatus.NO));
+ assertThat(testActiveRule.getInheritance(), nullValue());
assertEquals(1, testActiveRule.getActiveRuleParams().size());
ActiveRuleParam testActiveRuleParam = testActiveRule.getActiveRuleParams().get(0);
@@ -149,7 +150,7 @@ public class BackupTest {
assertEquals("test2 name", testProfile.getName());
assertEquals("test name", testProfile.getParentName());
testActiveRule = testProfile.getActiveRules().get(0);
- assertThat(testActiveRule.getInheritanceStatus(), is(ActiveRuleInheritanceStatus.OVERRIDDEN));
+ assertThat(testActiveRule.getInheritance(), is(ActiveRule.OVERRIDES));
Collection<Rule> rules = sonarConfig.getRules();
assertThat(rules.size(), is(1));
@@ -181,7 +182,7 @@ public class BackupTest {
RulesProfile testProfile = profiles.iterator().next();
assertThat(testProfile.getActiveRules().size(), is(1));
ActiveRule activeRule = testProfile.getActiveRules().get(0);
- assertThat(activeRule.getInheritanceStatus(), is(ActiveRuleInheritanceStatus.NO));
+ assertThat(activeRule.getInheritance(), nullValue());
}
@Test
@@ -283,7 +284,7 @@ public class BackupTest {
ActiveRule activeRule2 = profile2.activateRule(rule, RulePriority.MINOR);
activeRule2.setParameter("test param key", "test value");
- activeRule2.setInheritanceStatus(ActiveRuleInheritanceStatus.OVERRIDDEN);
+ activeRule2.setInheritance(ActiveRule.OVERRIDES);
profiles.get(0).getAlerts().add(new Alert(null, new Metric("test key"), Alert.OPERATOR_GREATER, "testError", "testWarn"));
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-restore-valid.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-restore-valid.xml
index afbcd51f3e1..f61e6e67c4b 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-restore-valid.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-restore-valid.xml
@@ -42,7 +42,6 @@
<key><![CDATA[test key]]></key>
<plugin><![CDATA[test plugin]]></plugin>
<level><![CDATA[ERROR]]></level>
- <inherited><![CDATA[NO]]></inherited>
<params>
<param>
<key><![CDATA[test param key]]></key>
@@ -71,7 +70,7 @@
<key><![CDATA[test key]]></key>
<plugin><![CDATA[test plugin]]></plugin>
<level><![CDATA[ERROR]]></level>
- <inherited><![CDATA[OVERRIDDEN]]></inherited>
+ <inheritance><![CDATA[OVERRIDES]]></inheritance>
<params>
<param>
<key><![CDATA[test param key]]></key>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
index 55e7c52ef69..fb024b6d419 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
@@ -44,7 +44,6 @@
<key><![CDATA[test key]]></key>
<plugin><![CDATA[test plugin]]></plugin>
<level><![CDATA[MAJOR]]></level>
- <inherited><![CDATA[NO]]></inherited>
<params>
<param>
<key><![CDATA[test param key]]></key>
@@ -73,7 +72,7 @@
<key><![CDATA[test key]]></key>
<plugin><![CDATA[test plugin]]></plugin>
<level><![CDATA[MINOR]]></level>
- <inherited><![CDATA[OVERRIDDEN]]></inherited>
+ <inheritance><![CDATA[OVERRIDES]]></inheritance>
<params>
<param>
<key><![CDATA[test param key]]></key>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
index 3ce3a268197..dff95033851 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
@@ -9,10 +9,10 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" value="30"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inherited="1"/>
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"/>
<active_rule_parameters id="2" active_rule_id="2" rules_parameter_id="1" value="30"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
index 5df60edae3d..4b555960447 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
@@ -9,7 +9,7 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" value="30"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
index e1c19620adb..1f7efb177a9 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
@@ -12,10 +12,10 @@
<rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="new_parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inherited="0"/>
+ <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]"/>
- <active_rules id="4" profile_id="3" rule_id="2" failure_level="2" inherited="1"/>
+ <active_rules id="4" profile_id="3" rule_id="2" failure_level="2" inheritance="INHERITED"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
index 958b9a98031..ba8530b21f7 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
@@ -12,10 +12,10 @@
<rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inherited="0"/>
+ <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]"/>
- <active_rules id="3" profile_id="3" rule_id="1" failure_level="2" inherited="1"/>
+ <active_rules id="3" profile_id="3" rule_id="1" failure_level="2" inheritance="INHERITED"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
index e51993058f6..9a2c56efae8 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
@@ -7,6 +7,6 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
index 2d08e30f5a3..4760d12b7d9 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
@@ -7,8 +7,8 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inherited="1"/>
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
index 93223e48dfc..1493a8e8897 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
@@ -7,6 +7,6 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
index 2d08e30f5a3..4760d12b7d9 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
@@ -7,8 +7,8 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inherited="1"/>
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
index 2d08e30f5a3..4760d12b7d9 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
@@ -7,8 +7,8 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inherited="1"/>
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
index 93223e48dfc..1493a8e8897 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
@@ -7,6 +7,6 @@
<rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]"/>
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inherited="0"/>
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>