From 13ea2cd6ea7b819fda2f3ca71095d51eae7c2c5e Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 15 Jan 2015 11:49:16 +0100 Subject: [PATCH] SONAR-6054 Update the format of PROJECTS.MODULE_UUID_PATH --- .../db/migrations/DatabaseMigrations.java | 3 +- .../v51/UpdateProjectsModuleUuidPath.java | 80 +++++++++++++++++++ .../server/component/ComponentTesting.java | 7 +- .../server/component/db/ComponentDaoTest.java | 20 ++--- .../v51/UpdateProjectsModuleUuidPathTest.java | 65 +++++++++++++++ .../db/ComponentDaoTest/delete-result.xml | 10 +-- .../find_files_from_module.xml | 12 +-- .../ComponentDaoTest/find_project_uuids.xml | 14 ++-- .../db/ComponentDaoTest/insert-result.xml | 2 +- .../insert_disabled_component-result.xml | 2 +- .../db/ComponentDaoTest/multi-modules.xml | 10 +-- .../component/db/ComponentDaoTest/shared.xml | 10 +-- .../component/db/SnapshotDaoTest/modules.xml | 10 +-- .../migrate_components.xml | 10 +-- .../migrate_components_without_uuid.xml | 6 +- .../migrate_developer.xml | 2 +- .../migrate_disable_components.xml | 10 +-- .../migrate_library.xml | 2 +- .../migrate_provisioned_project.xml | 2 +- .../migrate_view.xml | 6 +- ...ot_migrate_already_migrated_components.xml | 6 +- .../do_not_execute_if_already_migrated.xml | 2 +- .../execute.xml | 2 +- .../migrate_components-result.xml | 48 +++++++++++ .../migrate_components.xml | 48 +++++++++++ ...ot_migrate_already_migrated_components.xml | 48 +++++++++++ .../schema.sql | 22 +++++ .../no_authorization.xml | 2 +- .../IssueAuthorizationDaoTest/shared.xml | 4 +- .../IssueAuthorizationIndexerTest/index.xml | 2 +- .../issue/index/IssueIndexerTest/index.xml | 4 +- .../767_update_projects_module_uuid_path.rb | 30 +++++++ .../sonar/batch/index/ResourcePersister.java | 9 +-- .../sonar/core/component/ComponentDto.java | 2 + .../core/persistence/DatabaseVersion.java | 2 +- .../java/org/sonar/core/user/AuthorDao.java | 5 ++ .../core/component/db/ComponentMapper.xml | 9 +-- .../org/sonar/core/persistence/rows-h2.sql | 1 + .../org/sonar/core/issue/db/IssueDaoTest.java | 2 +- .../sonar/core/resource/ResourceDaoTest.java | 6 +- .../core/issue/db/IssueDaoTest/shared.xml | 8 +- .../select_children_module_properties.xml | 10 +-- ...ete_file_sources_of_disabled_resources.xml | 8 +- ...resources_without_last_snapshot-result.xml | 6 +- ...isable_resources_without_last_snapshot.xml | 6 +- .../select_purgeable_file_uuids.xml | 10 +-- ...oricalDataOfDirectoriesAndFiles-result.xml | 6 +- ...eteHistoricalDataOfDirectoriesAndFiles.xml | 6 +- .../PurgeDaoTest/shouldDeleteProject.xml | 8 +- .../shouldPurgeProject-result.xml | 2 +- .../purge/PurgeDaoTest/shouldPurgeProject.xml | 2 +- ...g-ghost-projects-and-technical-project.xml | 16 ++-- .../core/resource/ResourceDaoTest/fixture.xml | 8 +- .../getResources_exclude_disabled.xml | 4 +- .../get_last_snapshot_by_component_uuid.xml | 8 +- .../ResourceDaoTest/insert-result.xml | 4 +- .../ResourceDaoTest/update-result.xml | 2 +- .../core/resource/ResourceDaoTest/update.xml | 2 +- .../update_authorization_date-result.xml | 2 +- .../update_authorization_date.xml | 2 +- .../shouldIndexMultiModulesProject-result.xml | 8 +- .../shouldIndexMultiModulesProject.xml | 8 +- .../shouldIndexProjects-result.xml | 6 +- .../shouldIndexProjects.xml | 6 +- .../shouldNotIndexPackages.xml | 6 +- ...shouldReIndexNewTwoLettersLongResource.xml | 2 +- .../shouldReIndexTwoLettersLongResource.xml | 2 +- ...ouldReindexProjectAfterRenaming-result.xml | 2 +- .../shouldReindexProjectAfterRenaming.xml | 2 +- .../ResourceKeyUpdaterDaoTest/shared.xml | 16 ++-- .../shouldBulkUpdateKey-result.xml | 16 ++-- ...BulkUpdateKeyOnOnlyOneSubmodule-result.xml | 16 ++-- .../shouldNotUpdateAllSubmodules-result.xml | 14 ++-- .../shouldNotUpdateAllSubmodules.xml | 14 ++-- .../shouldUpdateKey-result.xml | 16 ++-- .../shouldInsertAuthorAndDeveloper-result.xml | 2 +- ...AuthorsAndDevelopersDuplication-result.xml | 2 +- ...PreventAuthorsAndDevelopersDuplication.xml | 2 +- 78 files changed, 572 insertions(+), 225 deletions(-) create mode 100644 server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java create mode 100644 server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql create mode 100644 server/sonar-web/src/main/webapp/WEB-INF/db/migrate/767_update_projects_module_uuid_path.rb diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java index 4fd0f755497..35482f7072c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java @@ -82,6 +82,7 @@ public interface DatabaseMigrations { RenameComponentRelatedParamsInIssueFilters.class, CopyScmAccountsFromAuthorsToUsers.class, FeedIssueChangesLongDates.class, - FeedAnalysisReportsLongDates.class + FeedAnalysisReportsLongDates.class, + UpdateProjectsModuleUuidPath.class ); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java new file mode 100644 index 00000000000..468887c322b --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java @@ -0,0 +1,80 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube 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. + * + * SonarQube 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonar.server.db.migrations.v51; + +import org.sonar.core.persistence.Database; +import org.sonar.server.db.migrations.BaseDataChange; +import org.sonar.server.db.migrations.MassUpdate; +import org.sonar.server.db.migrations.MassUpdate.Handler; +import org.sonar.server.db.migrations.Select.Row; +import org.sonar.server.db.migrations.SqlStatement; + +import javax.annotation.Nullable; + +import java.sql.SQLException; + +/** + * SONAR-6054 + */ +public class UpdateProjectsModuleUuidPath extends BaseDataChange { + + private static final String SEP = "."; + + public UpdateProjectsModuleUuidPath(Database db) { + super(db); + } + + @Override + public void execute(Context context) throws SQLException { + MassUpdate update = context.prepareMassUpdate().rowPluralName("projects"); + update.select("SELECT p.id, p.module_uuid_path FROM projects p"); + update.update("UPDATE projects SET module_uuid_path=? WHERE id=?"); + update.execute(new Handler() { + @Override + public boolean handle(Row row, SqlStatement update) throws SQLException { + Long id = row.getLong(1); + String moduleUuidPath = row.getString(2); + if (needUpdate(moduleUuidPath)) { + update.setString(1, newModuleUuidPath(moduleUuidPath)); + update.setLong(2, id); + return true; + } + return false; + } + }); + } + + private static boolean needUpdate(@Nullable String moduleUuidPath) { + return moduleUuidPath == null || !(moduleUuidPath.startsWith(SEP) && moduleUuidPath.endsWith(SEP)); + } + + private static String newModuleUuidPath(@Nullable String oldModuleUuidPath) { + if (oldModuleUuidPath == null || oldModuleUuidPath.isEmpty()) { + return SEP; + } else { + StringBuilder newModuleUuidPath = new StringBuilder(oldModuleUuidPath); + newModuleUuidPath.insert(0, SEP); + newModuleUuidPath.append(SEP); + return newModuleUuidPath.toString(); + } + } + +} diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentTesting.java b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentTesting.java index 347a2afb8e1..a00154575aa 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentTesting.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentTesting.java @@ -25,6 +25,8 @@ import org.sonar.api.resources.Scopes; import org.sonar.api.utils.internal.Uuids; import org.sonar.core.component.ComponentDto; +import static org.sonar.core.component.ComponentDto.MODULE_UUID_PATH_SEP; + public class ComponentTesting { public static ComponentDto newFileDto(ComponentDto subProjectOrProject) { @@ -36,7 +38,7 @@ public class ComponentTesting { .setUuid(fileUuid) .setProjectUuid(module.projectUuid()) .setModuleUuid(module.uuid()) - .setModuleUuidPath(module.moduleUuidPath() == null ? module.uuid() : module.moduleUuidPath() + "." + module.uuid()) + .setModuleUuidPath(module.moduleUuidPath() + module.uuid() + MODULE_UUID_PATH_SEP) .setKey("KEY_" + fileUuid) .setName("NAME_" + fileUuid) .setLongName("LONG_NAME_" + fileUuid) @@ -54,7 +56,7 @@ public class ComponentTesting { .setUuid(Uuids.create()) .setProjectUuid(subProjectOrProject.projectUuid()) .setModuleUuid(subProjectOrProject.uuid()) - .setModuleUuidPath(subProjectOrProject.moduleUuidPath() == null ? subProjectOrProject.uuid() : subProjectOrProject.moduleUuidPath() + "." + subProjectOrProject.uuid()) + .setModuleUuidPath(subProjectOrProject.moduleUuidPath() + subProjectOrProject.uuid() + MODULE_UUID_PATH_SEP) .setKey("KEY_" + uuid) .setName("NAME_" + uuid) .setLongName("LONG_NAME_" + uuid) @@ -74,6 +76,7 @@ public class ComponentTesting { return new ComponentDto() .setUuid(uuid) .setProjectUuid(uuid) + .setModuleUuidPath(MODULE_UUID_PATH_SEP) .setKey("KEY_" + uuid) .setName("NAME_" + uuid) .setLongName("LONG_NAME_" + uuid) diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java index c106145ca0d..aa7a3754861 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java @@ -69,7 +69,7 @@ public class ComponentDaoTest extends AbstractDaoTestCase { assertThat(result).isNotNull(); assertThat(result.uuid()).isEqualTo("KLMN"); assertThat(result.moduleUuid()).isEqualTo("EFGH"); - assertThat(result.moduleUuidPath()).isEqualTo("ABCD.EFGH."); + assertThat(result.moduleUuidPath()).isEqualTo(".ABCD.EFGH."); assertThat(result.parentProjectId()).isEqualTo(2); assertThat(result.projectUuid()).isEqualTo("ABCD"); assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java"); @@ -174,7 +174,7 @@ public class ComponentDaoTest extends AbstractDaoTestCase { assertThat(result).isNotNull(); assertThat(result.uuid()).isEqualTo("KLMN"); assertThat(result.moduleUuid()).isEqualTo("EFGH"); - assertThat(result.moduleUuidPath()).isEqualTo("ABCD.EFGH."); + assertThat(result.moduleUuidPath()).isEqualTo(".ABCD.EFGH."); assertThat(result.parentProjectId()).isEqualTo(2); assertThat(result.projectUuid()).isEqualTo("ABCD"); assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java"); @@ -393,7 +393,7 @@ public class ComponentDaoTest extends AbstractDaoTestCase { .setUuid("GHIJ") .setProjectUuid("ABCD") .setModuleUuid("EFGH") - .setModuleUuidPath("ABCD.EFGH") + .setModuleUuidPath(".ABCD.EFGH.") .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") .setDeprecatedKey("org.struts:struts-core:src/org/struts/RequestContext.java") .setName("RequestContext.java") @@ -423,7 +423,7 @@ public class ComponentDaoTest extends AbstractDaoTestCase { .setUuid("GHIJ") .setProjectUuid("ABCD") .setModuleUuid("EFGH") - .setModuleUuidPath("ABCD.EFGH") + .setModuleUuidPath(".ABCD.EFGH.") .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") .setName("RequestContext.java") .setLongName("org.struts.RequestContext") @@ -445,9 +445,9 @@ public class ComponentDaoTest extends AbstractDaoTestCase { @Test(expected = IllegalStateException.class) public void update() { dao.update(session, new ComponentDto() - .setId(1L) - .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") - ); + .setId(1L) + .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") + ); } @Test @@ -455,9 +455,9 @@ public class ComponentDaoTest extends AbstractDaoTestCase { setupData("shared"); dao.delete(session, new ComponentDto() - .setId(1L) - .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") - ); + .setId(1L) + .setKey("org.struts:struts-core:src/org/struts/RequestContext.java") + ); session.commit(); checkTable("delete", "projects"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java new file mode 100644 index 00000000000..895c044a147 --- /dev/null +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java @@ -0,0 +1,65 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube 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. + * + * SonarQube 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonar.server.db.migrations.v51; + +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; +import org.sonar.api.utils.System2; +import org.sonar.core.persistence.DbTester; +import org.sonar.server.db.migrations.DatabaseMigration; + +public class UpdateProjectsModuleUuidPathTest { + + @ClassRule + public static DbTester db = new DbTester().schema(UpdateProjectsModuleUuidPathTest.class, "schema.sql"); + + DatabaseMigration migration; + + System2 system; + + @Before + public void setUp() throws Exception { + db.executeUpdateSql("truncate table projects"); + + migration = new UpdateProjectsModuleUuidPath(db.database()); + } + + @Test + public void migrate_empty_db() throws Exception { + migration.execute(); + } + + @Test + public void migrate() throws Exception { + db.prepareDbUnit(this.getClass(), "migrate_components.xml"); + migration.execute(); + db.assertDbUnit(this.getClass(), "migrate_components-result.xml", "projects"); + } + + @Test + public void not_migrate_already_migrated_components() throws Exception { + db.prepareDbUnit(this.getClass(), "not_migrate_already_migrated_components.xml"); + migration.execute(); + db.assertDbUnit(this.getClass(), "not_migrate_already_migrated_components.xml", "projects"); + } + +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/delete-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/delete-result.xml index 165990c3e29..1f5a52ba71d 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/delete-result.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/delete-result.xml @@ -6,7 +6,7 @@ @@ -61,7 +61,7 @@ - + @@ -77,7 +77,7 @@ version="[null]" path="1.2.3."/> diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_files_from_module.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_files_from_module.xml index bba672ec51e..e1ea8f31504 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_files_from_module.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_files_from_module.xml @@ -2,19 +2,19 @@ @@ -28,20 +28,20 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_project_uuids.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_project_uuids.xml index 924a9a769e1..5e78b107994 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_project_uuids.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/find_project_uuids.xml @@ -2,45 +2,45 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/insert-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/insert-result.xml index 23281cbd9df..6e5fd06ac0f 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/insert-result.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/insert-result.xml @@ -2,7 +2,7 @@ @@ -72,7 +72,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/shared.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/shared.xml index d01c2eed69a..d29c981b67d 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/shared.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentDaoTest/shared.xml @@ -6,7 +6,7 @@ @@ -61,7 +61,7 @@ @@ -78,7 +78,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/SnapshotDaoTest/modules.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/SnapshotDaoTest/modules.xml index d5c533536a9..12f2f9cd493 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/db/SnapshotDaoTest/modules.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/SnapshotDaoTest/modules.xml @@ -2,7 +2,7 @@ @@ -72,7 +72,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml index e38e16ae56f..cff6eb31173 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml @@ -2,7 +2,7 @@ @@ -18,7 +18,7 @@ @@ -64,7 +64,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml index 4c4c2ec4e28..c10e10949b5 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml @@ -2,7 +2,7 @@ @@ -18,7 +18,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml index f2a7202514c..d995fe3a7f7 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml @@ -17,7 +17,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml index a1e51111fc0..fed87fc45a7 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml @@ -2,7 +2,7 @@ @@ -18,7 +18,7 @@ @@ -64,7 +64,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml index bc464dc5264..d1e8908bf04 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml @@ -2,7 +2,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml index 0d3962b8d67..9e688d16451 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml @@ -2,7 +2,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml index 7b20b9d98ee..5a1a222a2ba 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml @@ -2,7 +2,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml index 524a1e3a682..175bb7686ad 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml @@ -33,7 +33,7 @@ @@ -64,7 +64,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml index 09d1237be02..0030a5b0b03 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml @@ -1,7 +1,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml index 8e0a6a3c5ea..811ac2b92d0 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml @@ -1,7 +1,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml new file mode 100644 index 00000000000..3f568ad6d41 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml new file mode 100644 index 00000000000..1a99736dfd9 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml new file mode 100644 index 00000000000..3f568ad6d41 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql new file mode 100644 index 00000000000..b7307a0902a --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql @@ -0,0 +1,22 @@ +CREATE TABLE "PROJECTS" ( + "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + "KEE" VARCHAR(400), + "ROOT_ID" INTEGER, + "UUID" VARCHAR(50), + "PROJECT_UUID" VARCHAR(50), + "MODULE_UUID" VARCHAR(50), + "MODULE_UUID_PATH" VARCHAR(4000), + "NAME" VARCHAR(256), + "DESCRIPTION" VARCHAR(2000), + "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE, + "SCOPE" VARCHAR(3), + "QUALIFIER" VARCHAR(10), + "DEPRECATED_KEE" VARCHAR(400), + "PATH" VARCHAR(2000), + "LANGUAGE" VARCHAR(20), + "COPY_RESOURCE_ID" INTEGER, + "LONG_NAME" VARCHAR(256), + "PERSON_ID" INTEGER, + "CREATED_AT" TIMESTAMP, + "AUTHORIZATION_UPDATED_AT" BIGINT +); diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/no_authorization.xml b/server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/no_authorization.xml index d37c42bd89f..06f424257dc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/no_authorization.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/no_authorization.xml @@ -1,6 +1,6 @@ - - - - + uuid="THE_PROJECT" module_uuid="[null]" module_uuid_path="."/> + uuid="THE_FILE" module_uuid="THE_PROJECT" module_uuid_path="."/> implements Component { + public static final String MODULE_UUID_PATH_SEP = "."; + private Long id; private String uuid; private String kee; 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 5e424689334..0c9e7238831 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 @@ -33,7 +33,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 766; + public static final int LAST_VERSION = 767; /** * List of all the tables.n diff --git a/sonar-core/src/main/java/org/sonar/core/user/AuthorDao.java b/sonar-core/src/main/java/org/sonar/core/user/AuthorDao.java index 2011043c61d..24f5d440de3 100644 --- a/sonar-core/src/main/java/org/sonar/core/user/AuthorDao.java +++ b/sonar-core/src/main/java/org/sonar/core/user/AuthorDao.java @@ -22,6 +22,7 @@ package org.sonar.core.user; import org.apache.ibatis.session.SqlSession; import org.sonar.api.BatchComponent; import org.sonar.api.ServerComponent; +import org.sonar.core.component.ComponentDto; import org.sonar.core.persistence.MyBatis; import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; @@ -76,6 +77,10 @@ public class AuthorDao implements BatchComponent, ServerComponent { public void insertAuthorAndDeveloper(String login, ResourceDto resourceDto) { SqlSession session = mybatis.openSession(false); try { + // Hack in order to set "." on DEV + if (resourceDto.getModuleUuidPath() == null || resourceDto.getModuleUuidPath().isEmpty()) { + resourceDto.setModuleUuidPath(ComponentDto.MODULE_UUID_PATH_SEP); + } resourceDao.insertUsingExistingSession(resourceDto, session); insertAuthor(login, resourceDto.getId(), session); session.commit(); diff --git a/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml index 4bb8e0a2cf8..b47c06374d6 100644 --- a/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml @@ -144,17 +144,16 @@ p.enabled = ${_true} AND p.scope = #{scope} - AND (p.uuid = module.uuid OR p.project_uuid = module.uuid - OR + AND (p.uuid = module.uuid OR - p.module_uuid_path LIKE module.module_uuid_path + '.' + module.uuid + '%' + p.module_uuid_path LIKE module.module_uuid_path + module.uuid + '.%' - p.module_uuid_path LIKE concat(module.module_uuid_path, '.', module.uuid, '%') + p.module_uuid_path LIKE concat(module.module_uuid_path, module.uuid, '.%') - p.module_uuid_path LIKE module.module_uuid_path || '.' || module.uuid || '%' + p.module_uuid_path LIKE module.module_uuid_path || module.uuid || '.%' ) 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 de0f44eed07..c5d83d90316 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 @@ -295,6 +295,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('763'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('764'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('765'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('766'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('767'); 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', '1418215735482', '1418215735482', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java index e55d83bfd1e..70a3765d66c 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java @@ -79,7 +79,7 @@ public class IssueDaoTest extends AbstractDaoTestCase { assertThat(issue.getComponentKey()).isEqualTo("Action.java"); assertThat(issue.getComponentId()).isEqualTo(401); assertThat(issue.getModuleUuid()).isEqualTo("BCDE"); - assertThat(issue.getModuleUuidPath()).isEqualTo("ABCD.BCDE."); + assertThat(issue.getModuleUuidPath()).isEqualTo(".ABCD.BCDE."); assertThat(issue.getProjectKey()).isEqualTo("struts"); // ABCD assertThat(issue.getProjectUuid()).isEqualTo("ABCD"); // null assertThat(issue.getProjectId()).isEqualTo(399); diff --git a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java index 78752e11a62..940d20690ac 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java @@ -121,7 +121,7 @@ public class ResourceDaoTest extends AbstractDaoTestCase { assertThat(file.getUuid()).isEqualTo("DEFG"); assertThat(file.getProjectUuid()).isEqualTo("ABCD"); assertThat(file.getModuleUuid()).isEqualTo("BCDE"); - assertThat(file.getModuleUuidPath()).isEqualTo("ABCD.BCDE"); + assertThat(file.getModuleUuidPath()).isEqualTo(".ABCD.BCDE."); } @Test @@ -251,12 +251,12 @@ public class ResourceDaoTest extends AbstractDaoTestCase { setupData("insert"); ResourceDto file1 = new ResourceDto() - .setUuid("ABCD").setProjectUuid("EFGH").setModuleUuid("EFGH").setModuleUuidPath("EFGH") + .setUuid("ABCD").setProjectUuid("EFGH").setModuleUuid("EFGH").setModuleUuidPath(".EFGH.") .setKey("org.struts:struts:/src/main/java/org/struts/Action.java") .setDeprecatedKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Action").setLongName("org.struts.Action").setPath("/foo/bar"); ResourceDto file2 = new ResourceDto() - .setUuid("BCDE").setProjectUuid("FGHI").setModuleUuid("FGHI").setModuleUuidPath("FGHI") + .setUuid("BCDE").setProjectUuid("FGHI").setModuleUuid("FGHI").setModuleUuidPath(".FGHI.") .setKey("org.struts:struts:/src/main/java/org/struts/Filter.java") .setDeprecatedKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Filter").setLongName("org.struts.Filter"); diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/shared.xml index a1606ab58d7..5d5e53e21a7 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/shared.xml @@ -2,10 +2,10 @@ - - - - + + + + diff --git a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/select_children_module_properties.xml b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/select_children_module_properties.xml index aca9e6b505c..61333a6de4a 100644 --- a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/select_children_module_properties.xml +++ b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/select_children_module_properties.xml @@ -21,32 +21,32 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml index 7a2eb5808a0..d8a11480abe 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml @@ -2,26 +2,26 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml index f9a281c0fd2..b629de0324f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml @@ -1,17 +1,17 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/select_purgeable_file_uuids.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/select_purgeable_file_uuids.xml index 2925fef21a4..449292b40d3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/select_purgeable_file_uuids.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/select_purgeable_file_uuids.xml @@ -2,33 +2,33 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml index 95ae353749c..87fcbb6f98a 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml @@ -1,17 +1,17 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml index 91e1c3c1c58..c48c4a9ced4 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml @@ -2,7 +2,7 @@ @@ -50,7 +50,7 @@ @@ -68,7 +68,7 @@ @@ -86,7 +86,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml index c79406669fb..f79043727a5 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml @@ -1,7 +1,7 @@ - diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml index 27d8ca38164..c6f3169fec1 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml @@ -1,7 +1,7 @@ - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml index 39dcac93842..d44370b55de 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml @@ -3,7 +3,7 @@ @@ -74,13 +74,13 @@ @@ -31,7 +31,7 @@ @@ -47,7 +47,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml index b60896e0123..f62fdee69b5 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml @@ -6,7 +6,7 @@ @@ -61,7 +61,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml index bbaa53ea1a3..940d4b28466 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml @@ -1,12 +1,12 @@ - - - - - - module "struts-core" -> package org.struts -> file "RequestContext" --> module "struts-core" -> package org.struts -> file "RequestContext" --> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldNotIndexPackages.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldNotIndexPackages.xml index 84440419a6d..a85b7da7afc 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldNotIndexPackages.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldNotIndexPackages.xml @@ -2,21 +2,21 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexNewTwoLettersLongResource.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexNewTwoLettersLongResource.xml index 4de6c73606e..e68eb44f359 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexNewTwoLettersLongResource.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexNewTwoLettersLongResource.xml @@ -1,7 +1,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexTwoLettersLongResource.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexTwoLettersLongResource.xml index 6c8bc14c474..101f1e2f8af 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexTwoLettersLongResource.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReIndexTwoLettersLongResource.xml @@ -1,7 +1,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml index f6b16a78283..6103a4be809 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml @@ -1,7 +1,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml index 0b0bbee6401..32940882fa3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml @@ -1,7 +1,7 @@ diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml index 0bbfe3d2f51..daf6852cd6f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml @@ -1,56 +1,56 @@ - - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml index 028049f8e5d..3c4acff9c8e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml @@ -1,56 +1,56 @@ - - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml index 67ca8cedc3b..e1d46078158 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml @@ -1,56 +1,56 @@ - - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml index 775d397ce0a..d0914f931c3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml @@ -1,49 +1,49 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml index e10ae936abb..6e91a2a7b2f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml @@ -1,49 +1,49 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml index 04534427cb1..73e4814cfcd 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml @@ -1,7 +1,7 @@ - @@ -10,49 +10,49 @@ - - - diff --git a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml index fdd4549b2e4..3694b2e378d 100644 --- a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml @@ -1,4 +1,4 @@ - + diff --git a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml index 1b2acc5f72a..1ca73f3dcf3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml @@ -1,6 +1,6 @@ - + diff --git a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml index 1b2acc5f72a..1ca73f3dcf3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml +++ b/sonar-core/src/test/resources/org/sonar/core/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml @@ -1,6 +1,6 @@ - + -- 2.39.5