From: Simon Brandhof Date: Thu, 27 Sep 2012 14:02:36 +0000 (+0200) Subject: SONAR-2602 remove the unused column RULES_PROFILES.ENABLED X-Git-Tag: 3.3~187 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb4e9b76c5f3b8404cd451c9050949569bc50128;p=sonarqube.git SONAR-2602 remove the unused column RULES_PROFILES.ENABLED --- diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index 754d5e973b6..8d7f02e6d08 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -35,7 +35,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 331; + public static final int LAST_VERSION = 332; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 05b077452b2..f96ebf5ccc8 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -173,6 +173,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('320'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('321'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('330'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('331'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('332'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 53e322fc449..6b469747ce3 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -71,7 +71,6 @@ CREATE TABLE "RULES_PROFILES" ( "PROVIDED" BOOLEAN NOT NULL DEFAULT FALSE, "LANGUAGE" VARCHAR(16), "PARENT_NAME" VARCHAR(100), - "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE, "VERSION" INTEGER DEFAULT 1, "USED_PROFILE" BOOLEAN DEFAULT FALSE ); diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml index ca00e8cb5c4..ed2f97ee294 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml @@ -1,7 +1,7 @@ - - - + + + \ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml index 0d8e296a25a..98922f49cc0 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml @@ -6,8 +6,8 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml index 0a6b2ee0e2c..8bedbeca82b 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml @@ -6,8 +6,8 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml index 394b84a7374..489fca92c1b 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml @@ -1,7 +1,7 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml index 107805b86f2..00226391488 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml @@ -1,7 +1,7 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml index 394b84a7374..d0334e987f0 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml @@ -1,7 +1,7 @@ - - + + diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index 171f2e92219..26409d1742b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -73,9 +73,6 @@ public class RulesProfile implements Cloneable { @Column(name = "provided", updatable = true, nullable = false) private Boolean provided = Boolean.FALSE; - @Column(name = "enabled", updatable = true, nullable = false) - private Boolean enabled = Boolean.TRUE; - @Column(name = "used_profile", updatable = true, nullable = false) private Boolean used = Boolean.FALSE; @@ -226,17 +223,31 @@ public class RulesProfile implements Cloneable { this.provided = b; } + /** + * @deprecated since 3.3. Always return true. + * @return + */ + @Deprecated public Boolean getEnabled() { - return enabled; + return Boolean.TRUE; } + /** + * @deprecated since 3.3. Always return true. + * @return + */ +@Deprecated public boolean isEnabled() { - return enabled == Boolean.TRUE; + return true; } + /** + * @deprecated since 3.3. + * @return + */ + @Deprecated public RulesProfile setEnabled(Boolean b) { - this.enabled = b; - return this; + throw new UnsupportedOperationException("The field RulesProfile#enabled is not supported since 3.3."); } /** 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 221f71c7264..b0cf4abc6dd 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 @@ -90,10 +90,6 @@ public class ProfilesBackup implements Backupable { } public void importProfile(RulesDao rulesDao, RulesProfile toImport) { - if (toImport.getEnabled() == null) { - // backward-compatibility with versions < 2.6. The field "enabled" did not exist. Default value is true. - toImport.setEnabled(true); - } if (toImport.getVersion() == 0) { // backward-compatibility with versions < 2.9. The field "version" did not exist. Default value is 1. toImport.setVersion(1); 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 54fbae8b538..f2187326fcf 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 @@ -345,8 +345,7 @@ public class ProfilesManager extends BaseDao { return getSession().getResults(RulesProfile.class, "language", parent.getLanguage(), "parentName", parent.getName(), - "provided", false, - "enabled", true); + "provided", false); } private void removeActiveRule(RulesProfile profile, ActiveRule activeRule) { @@ -357,8 +356,7 @@ public class ProfilesManager extends BaseDao { RulesProfile getProfile(String language, String name) { return getSession().getSingleResult(RulesProfile.class, "language", language, - "name", name, - "enabled", true); + "name", name); } RulesProfile getParentProfile(RulesProfile profile) { diff --git a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java index e5fa53e77e2..e6b41748b08 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java @@ -235,7 +235,6 @@ public final class Platform { startupContainer.addSingleton(RegisterMetrics.class); startupContainer.addSingleton(RegisterRules.class); startupContainer.addSingleton(RegisterProvidedProfiles.class); - startupContainer.addSingleton(EnableProfiles.class); startupContainer.addSingleton(ActivateDefaultProfiles.class); startupContainer.addSingleton(JdbcDriverDeployer.class); startupContainer.addSingleton(ServerMetadataPersister.class); 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 deleted file mode 100644 index e13cb134381..00000000000 --- a/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.server.startup; - -import com.google.common.collect.Sets; -import org.sonar.api.database.DatabaseSession; -import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Language; -import org.sonar.api.utils.TimeProfiler; -import org.sonar.jpa.session.DatabaseSessionFactory; - -import javax.persistence.Query; -import java.util.Set; - -/** - * @since 2.6 - */ -public final class EnableProfiles { - - private Language[] languages; - private DatabaseSessionFactory sessionFactory; - - - public EnableProfiles(Language[] languages, DatabaseSessionFactory sessionFactory, RegisterProvidedProfiles registerProfilesBefore) {// NOSONAR the parameter registerProfilesBefore is used to define the execution order of startup components - this.languages = languages; - this.sessionFactory = sessionFactory; - } - - public void start() { - TimeProfiler profiler = new TimeProfiler().start("Enable profiles"); - DatabaseSession session = sessionFactory.getSession(); - Set languages = getLanguageKeys(); - - enableProfilesOnKnownLanguages(languages, session); - disableProfilesOnMissingLanguages(languages, session); - - session.commit(); - profiler.stop(); - } - - private void enableProfilesOnKnownLanguages(Set languages, DatabaseSession session) { - Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language in (:languages)"); - query.setParameter("enabled", Boolean.TRUE); - query.setParameter("languages", languages); - query.executeUpdate(); - } - - private void disableProfilesOnMissingLanguages(Set languages, DatabaseSession session) { - Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language not in (:languages)"); - query.setParameter("enabled", Boolean.FALSE); - query.setParameter("languages", languages); - query.executeUpdate(); - } - - private Set getLanguageKeys() { - Set keys = Sets.newLinkedHashSet(); - for (Language language : languages) { - keys.add(language.getKey()); - } - return keys; - } -} diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb index b180bc3b79e..3cb66a8cc76 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb @@ -30,9 +30,9 @@ class Api::ProfilesController < Api::ApiController name=params[:name] if name.blank? - @profile=Profile.find(:first, :conditions => ['language=? and default_profile=? and enabled=?', language, true, true]) + @profile=Profile.find(:first, :conditions => ['language=? and default_profile=?', language, true]) else - @profile=Profile.find(:first, :conditions => ['language=? and name=? and enabled=?', language, name, true]) + @profile=Profile.find(:first, :conditions => ['language=? and name=?', language, name]) end raise ApiException.new(404, "Profile not found") if @profile.nil? @@ -60,9 +60,9 @@ class Api::ProfilesController < Api::ApiController bad_request('Missing parameter: language') if params[:language].blank? if params[:name].blank? - profile=Profile.find(:first, :conditions => ['language=? and default_profile=? and enabled=?', params[:language], true, true]) + profile=Profile.find(:first, :conditions => ['language=? and default_profile=?', params[:language], true]) else - profile=Profile.find(:first, :conditions => ['language=? and name=? and enabled=?', params[:language], params[:name], true]) + profile=Profile.find(:first, :conditions => ['language=? and name=?', params[:language], params[:name]]) end not_found('Profile not found') unless profile diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/332_remove_profiles_enabled_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/332_remove_profiles_enabled_column.rb new file mode 100644 index 00000000000..44468054e9b --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/332_remove_profiles_enabled_column.rb @@ -0,0 +1,43 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2012 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 3.3 +# +class RemoveProfilesEnabledColumn < ActiveRecord::Migration + + class Profile < ActiveRecord::Base + set_table_name 'rules_profiles' + end + + class ActiveRule < ActiveRecord::Base + end + + def self.up + disabled_profiles = Profile.find(:all, :conditions => {:enabled => false}) + disabled_profiles.each do |profile| + ActiveRule.delete_all ['profile_id=?', profile.id] + Profile.delete(profile.id) + end + + remove_column('rules_profiles', 'enabled') + end + +end diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java index a762d9bcc14..4d050133241 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java @@ -19,7 +19,6 @@ */ package org.sonar.server.configuration; -import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Test; import org.sonar.api.measures.Metric; @@ -31,21 +30,16 @@ import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleParam; import org.sonar.api.rules.RulePriority; import org.sonar.jpa.test.AbstractDbUnitTestCase; -import org.sonar.server.platform.PersistentSettings; -import org.sonar.test.TestUtils; -import java.io.IOException; import java.util.Arrays; import static org.fest.assertions.Assertions.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.collection.IsCollectionContaining.hasItem; -import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; public class ProfilesBackupTest extends AbstractDbUnitTestCase { @@ -152,29 +146,4 @@ public class ProfilesBackupTest extends AbstractDbUnitTestCase { assertEquals(1, newProfile.getActiveRules(RulePriority.MAJOR).get(0).getActiveRuleParams().size()); assertEquals(2, newProfile.getAlerts().size()); } - - /** - * The field has been added in version 2.6. Profiles imported from backup of previous releases must - * be considered as enabled. - */ - @Test - public void shouldSupportMissingEnabledField() throws IOException { - Backup backup = new Backup(getSession(), mock(PersistentSettings.class)); - backup.doImportXml(FileUtils.readFileToString(TestUtils.getResource(getClass(), "shouldSupportMissingEnabledField.xml"))); - - RulesProfile profile = getSession().getSingleResult(RulesProfile.class, "name", "Missing enabled field"); - assertThat(profile.getEnabled(), is(Boolean.TRUE)); - } - - @Test - public void shouldSupportEnabledField() throws IOException { - Backup backup = new Backup(getSession(), mock(PersistentSettings.class)); - backup.doImportXml(FileUtils.readFileToString(TestUtils.getResource(getClass(), "shouldSupportEnabledField.xml"))); - - RulesProfile enabledProfile = getSession().getSingleResult(RulesProfile.class, "name", "Enabled"); - assertThat(enabledProfile.getEnabled(), is(Boolean.TRUE)); - - RulesProfile disabledProfile = getSession().getSingleResult(RulesProfile.class, "name", "Disabled"); - assertThat(disabledProfile.getEnabled(), is(Boolean.FALSE)); - } } diff --git a/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java b/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java deleted file mode 100644 index 5aa05686a2e..00000000000 --- a/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.server.startup; - -import org.junit.Test; -import org.sonar.api.resources.AbstractLanguage; -import org.sonar.api.resources.Java; -import org.sonar.api.resources.Language; -import org.sonar.jpa.test.AbstractDbUnitTestCase; - -public class EnableProfilesTest extends AbstractDbUnitTestCase { - - @Test - public void shouldDisableProfilesWithMissingLanguages() { - setupData("shouldDisableProfilesWithMissingLanguages"); - - Language[] languages = new Language[]{Java.INSTANCE, new Php()}; - EnableProfiles task = new EnableProfiles(languages, getSessionFactory(), null); - task.start(); - - checkTables("shouldDisableProfilesWithMissingLanguages", "rules_profiles"); - } - - @Test - public void shouldEnableProfilesWithKnownLanguages() { - setupData("shouldEnableProfilesWithKnownLanguages"); - - Language[] languages = new Language[]{Java.INSTANCE, new Php()}; - EnableProfiles task = new EnableProfiles(languages, getSessionFactory(), null); - task.start(); - - checkTables("shouldEnableProfilesWithKnownLanguages", "rules_profiles"); - } - - private static class Php extends AbstractLanguage { - - public Php() { - super("php"); - } - - public String[] getFileSuffixes() { - return new String[0]; - } - } -} - 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 b5df287f5ce..5cc0ed90165 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 @@ -41,7 +41,6 @@ - @@ -70,7 +69,6 @@ - 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 cc9d1869478..c2d5e12d877 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 @@ -5,9 +5,9 @@ - + - + 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 75c3d712a0f..3c70971f6dd 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 @@ -5,9 +5,9 @@ - + - + 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 84ca4c97e9d..73070213618 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 @@ -6,11 +6,11 @@ - + - + - + 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 b2daef7a8eb..e2ffc6c1b5d 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 @@ -6,11 +6,11 @@ - + - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml index 5200875be21..d70a004f645 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml @@ -3,10 +3,10 @@ - - - - - + + + + + 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 3371d019f58..69f2414ab44 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 @@ -3,9 +3,9 @@ - - - + + + 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 8d4e2c9072c..675733841ee 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 @@ -3,9 +3,9 @@ - + - + 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 a27f357b556..99aa8e2f72c 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 @@ -3,9 +3,9 @@ - + - + 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 8d4e2c9072c..675733841ee 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 @@ -3,9 +3,9 @@ - + - + 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 5d9be47123b..2965514fe63 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 @@ -3,9 +3,9 @@ - + - + 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 253e69aac65..be9735173d3 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 @@ -3,9 +3,9 @@ - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/changeParentProfile.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/changeParentProfile.xml index b5d2d18e454..21b280dbf5a 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/changeParentProfile.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/changeParentProfile.xml @@ -7,9 +7,9 @@ plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/initialData.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/initialData.xml index 7aeb11f9b99..74e92695bf8 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/initialData.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/initialData.xml @@ -7,9 +7,9 @@ plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/ruleReverted.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/ruleReverted.xml index e682eb176a8..003a84d8649 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/ruleReverted.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/ruleReverted.xml @@ -5,9 +5,9 @@ - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsed-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsed-result.xml index b5be9280b9a..5091ab1bb76 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsed-result.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsed-result.xml @@ -1,7 +1,7 @@ - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsedAndInChildren-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsedAndInChildren-result.xml index 8c3d85e7418..fa61bed30b6 100644 --- a/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsedAndInChildren-result.xml +++ b/sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/versionIncreaseIfUsedAndInChildren-result.xml @@ -1,7 +1,7 @@ - + - + diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages-result.xml deleted file mode 100644 index 23de3e4d491..00000000000 --- a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages-result.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages.xml b/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages.xml deleted file mode 100644 index 082f8785417..00000000000 --- a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldDisableProfilesWithMissingLanguages.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages-result.xml deleted file mode 100644 index 505d4bc123f..00000000000 --- a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages-result.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages.xml b/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages.xml deleted file mode 100644 index 7d26e5127f0..00000000000 --- a/sonar-server/src/test/resources/org/sonar/server/startup/EnableProfilesTest/shouldEnableProfilesWithKnownLanguages.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml index abb38157dc4..58d69d0ea81 100644 --- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml +++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml @@ -6,8 +6,8 @@