diff options
author | Javier García Orduña <javier.garcia@sonarsource.com> | 2025-02-04 10:25:06 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2025-02-04 20:03:17 +0000 |
commit | fe461c0778256f68325f6a7f53208999b28582fc (patch) | |
tree | 9e19ff8351ad2521c06db29d7e24bb3ce4abded7 /server/sonar-db-dao/src | |
parent | dcbad1646752f1b7d8eb4904e7e8a1923734cde8 (diff) | |
download | sonarqube-fe461c0778256f68325f6a7f53208999b28582fc.tar.gz sonarqube-fe461c0778256f68325f6a7f53208999b28582fc.zip |
SQRP-154 Cleanup leftovers from FOSSA
Diffstat (limited to 'server/sonar-db-dao/src')
23 files changed, 1 insertions, 773 deletions
diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveCweDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveCweDaoIT.java deleted file mode 100644 index 83f63f88afa..00000000000 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveCweDaoIT.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; -import org.sonar.api.utils.System2; -import org.sonar.db.DbTester; - -import static org.assertj.core.api.Assertions.assertThat; - -class CveCweDaoIT { - - @RegisterExtension - private final DbTester db = DbTester.create(System2.INSTANCE); - - private final CveCweDao cveCweDao = db.getDbClient().cveCweDao(); - - @Test - void insert_shouldPersistCveCwe() { - var cveCweDto = new CveCweDto("CVE_UUID", "CWE-123"); - - cveCweDao.insert(db.getSession(), cveCweDto); - - List<Map<String, Object>> result = db.select(db.getSession(), "select * from cve_cwe"); - assertThat(result).hasSize(1); - assertThat(result.get(0)).containsExactlyInAnyOrderEntriesOf( - Map.of( - "cve_uuid", cveCweDto.cveUuid(), - "cwe", cveCweDto.cwe()) - ); - } - - @Test - void selectByCveUuid_shouldReturnCwesAttachedToCve() { - String cveUuid = "CVE_UUID"; - cveCweDao.insert(db.getSession(), new CveCweDto(cveUuid, "CWE-123")); - cveCweDao.insert(db.getSession(), new CveCweDto(cveUuid, "CWE-456")); - cveCweDao.insert(db.getSession(), new CveCweDto("ANOTHER_CVE_UUID", "CWE-789")); - - Set<String> result = cveCweDao.selectByCveUuid(db.getSession(), cveUuid); - - assertThat(result).containsExactlyInAnyOrder("CWE-123", "CWE-456"); - } - - @Test - void selectByCveUuid_shouldReturnEmpty_whenNoCweAttachedToCve() { - Set<String> result = cveCweDao.selectByCveUuid(db.getSession(), "some_uuid"); - - assertThat(result).isEmpty(); - } - - @Test - void deleteByCveUuid_shouldDeleteCwesAttachedToCve() { - String cveUuid = "CVE_UUID"; - cveCweDao.insert(db.getSession(), new CveCweDto(cveUuid, "CWE-123")); - cveCweDao.insert(db.getSession(), new CveCweDto(cveUuid, "CWE-456")); - CveCweDto nonDeletedCwe = new CveCweDto("ANOTHER_CVE_UUID", "CWE-789"); - cveCweDao.insert(db.getSession(), nonDeletedCwe); - - cveCweDao.deleteByCveUuid(db.getSession(), cveUuid); - - List<Map<String, Object>> result = db.select(db.getSession(), "select * from cve_cwe"); - assertThat(result).hasSize(1); - assertThat(result.get(0)).containsExactlyInAnyOrderEntriesOf( - Map.of( - "cve_uuid", nonDeletedCwe.cveUuid(), - "cwe", nonDeletedCwe.cwe()) - ); - } - -} diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveDaoIT.java deleted file mode 100644 index d005a59d2b0..00000000000 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/CveDaoIT.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; -import org.sonar.api.utils.System2; -import org.sonar.db.DbTester; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.fail; - -class CveDaoIT { - - @RegisterExtension - private final DbTester db = DbTester.create(System2.INSTANCE); - - private final CveDao cveDao = db.getDbClient().cveDao(); - - @Test - void insert_shouldPersistCve() { - var cveDto = new CveDto("CVE_UUID", - "CVE-2021-12345", - "Some CVE description", - 7.5, - 0.00109, - 0.447540000, - System.currentTimeMillis() - 2_000, - System.currentTimeMillis() - 1_500, - System.currentTimeMillis() - 1_000, - System.currentTimeMillis() - 500); - - cveDao.insert(db.getSession(), cveDto); - - List<Map<String, Object>> result = db.select(db.getSession(), "select * from cves"); - assertThat(result).hasSize(1); - assertThat(result.get(0)).containsExactlyInAnyOrderEntriesOf( - Map.of( - "uuid", cveDto.uuid(), - "id", cveDto.id(), - "description", cveDto.description(), - "cvss_score", cveDto.cvssScore(), - "epss_score", cveDto.epssScore(), - "epss_percentile", cveDto.epssPercentile(), - "published_at", cveDto.publishedAt(), - "last_modified_at", cveDto.lastModifiedAt(), - "created_at", cveDto.createdAt(), - "updated_at", cveDto.updatedAt()) - ); - } - - @Test - void selectById_shouldReturnCve() { - String cveId = "CVE-2021-12345"; - var cveDto = new CveDto("CVE_UUID", - cveId, - "Some CVE description", - 7.5, - 0.00109, - 0.447540000, - System.currentTimeMillis() - 2_000, - System.currentTimeMillis() - 1_500, - System.currentTimeMillis() - 1_000, - System.currentTimeMillis() - 500); - cveDao.insert(db.getSession(), cveDto); - - CveDto result = cveDao.selectById(db.getSession(), cveId) - .orElseGet(() -> fail("Cve not found")); - - assertThat(result).usingRecursiveComparison().isEqualTo(cveDto); - } - - @Test - void update_shouldUpdateCveButCreationDate() { - CveDto insertedDto = new CveDto("uuid-1", "CVE-1", "Some CVE description 1", 1.0, 2.0, 3.0, 4L, 5L, 6L, 7L); - cveDao.insert(db.getSession(), insertedDto); - CveDto updatedDto = new CveDto("uuid-1", "CVE-2", "Some CVE description 2", 7.0, 1.0, 2.0, 3L, 4L, 5L, 6L); - - cveDao.update(db.getSession(), updatedDto); - - CveDto result = cveDao.selectById(db.getSession(), updatedDto.id()).orElseGet(() -> fail("CVE not found in database")); - assertThat(result).usingRecursiveComparison().ignoringFields("createdAt").isEqualTo(updatedDto); - assertThat(result.createdAt()).isEqualTo(insertedDto.createdAt()); - } - -} diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/IssuesDependencyDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/IssuesDependencyDaoIT.java deleted file mode 100644 index 17e31fad99f..00000000000 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/dependency/IssuesDependencyDaoIT.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; -import org.sonar.api.utils.System2; -import org.sonar.db.DbTester; - -import static org.assertj.core.api.Assertions.assertThat; - -class IssuesDependencyDaoIT { - - @RegisterExtension - private final DbTester db = DbTester.create(System2.INSTANCE); - - private final IssuesDependencyDao issuesDependencyDao = db.getDbClient().issuesDependencyDao(); - - @Test - void insert_shouldPersistIssuesDependency() { - var issuesDependencyDto = new IssuesDependencyDto("ISSUE_UUID", "CVE_UUID"); - - issuesDependencyDao.insert(db.getSession(), issuesDependencyDto); - - List<Map<String, Object>> result = db.select(db.getSession(), "select * from issues_dependency"); - assertThat(result).hasSize(1); - assertThat(result.get(0)).containsExactlyInAnyOrderEntriesOf( - Map.of( - "issue_uuid", issuesDependencyDto.issueUuid(), - "cve_uuid", issuesDependencyDto.cveUuid()) - ); - - } -} diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java index 90202c0da23..df3414b2cfc 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java @@ -52,8 +52,6 @@ import org.sonar.db.component.BranchDto; import org.sonar.db.component.BranchType; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; -import org.sonar.db.dependency.CveDto; -import org.sonar.db.dependency.IssuesDependencyDto; import org.sonar.db.protobuf.DbIssues; import org.sonar.db.rule.RuleDto; import org.sonar.db.rule.RuleTesting; @@ -222,21 +220,6 @@ class IssueDaoIT { } @Test - void selectByKeys_shouldFetchCveIds() { - prepareTables(); - var cveDto1 = new CveDto("cve_uuid_1", "CVE-123", "Some CVE description", 1.0, 2.0, 3.0, 4L, 5L, 6L, 7L); - db.getDbClient().cveDao().insert(db.getSession(), cveDto1); - var cveDto2 = new CveDto("cve_uuid_2", "CVE-456", "Some CVE description", 1.0, 2.0, 3.0, 4L, 5L, 6L, 7L); - db.getDbClient().cveDao().insert(db.getSession(), cveDto2); - db.issues().insertIssuesDependency(new IssuesDependencyDto(ISSUE_KEY1, cveDto1.uuid())); - db.issues().insertIssuesDependency(new IssuesDependencyDto(ISSUE_KEY2, cveDto2.uuid())); - - List<IssueDto> issues = underTest.selectByKeys(db.getSession(), asList("I1", "I2", "I3")); - - assertThat(issues).extracting(IssueDto::getCveId).containsExactlyInAnyOrder(cveDto1.id(), cveDto2.id()); - } - - @Test void scrollIndexationIssues_shouldReturnDto() { ComponentDto project = db.components().insertPrivateProject().getMainBranchComponent(); RuleDto rule = db.rules().insert(r -> r.setRepositoryKey("java").setLanguage("java") diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java index dedccd4ea73..db5edec1bf1 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java @@ -38,9 +38,6 @@ import org.sonar.db.component.ComponentDao; import org.sonar.db.component.ComponentKeyUpdaterDao; import org.sonar.db.component.ProjectLinkDao; import org.sonar.db.component.SnapshotDao; -import org.sonar.db.dependency.CveCweDao; -import org.sonar.db.dependency.CveDao; -import org.sonar.db.dependency.IssuesDependencyDao; import org.sonar.db.dependency.ProjectDependenciesDao; import org.sonar.db.duplication.DuplicationDao; import org.sonar.db.entity.EntityDao; @@ -132,8 +129,6 @@ public class DaoModule extends Module { CeTaskMessageDao.class, ComponentDao.class, ComponentKeyUpdaterDao.class, - CveDao.class, - CveCweDao.class, DefaultQProfileDao.class, DevOpsPermissionsMappingDao.class, DuplicationDao.class, @@ -155,7 +150,6 @@ public class DaoModule extends Module { IssueChangeDao.class, IssueDao.class, IssueFixedDao.class, - IssuesDependencyDao.class, MeasureDao.class, ProjectMeasureDao.class, MetricDao.class, diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java index f14d4657013..4ddbe135d14 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java @@ -38,9 +38,6 @@ import org.sonar.db.component.ComponentDao; import org.sonar.db.component.ComponentKeyUpdaterDao; import org.sonar.db.component.ProjectLinkDao; import org.sonar.db.component.SnapshotDao; -import org.sonar.db.dependency.CveCweDao; -import org.sonar.db.dependency.CveDao; -import org.sonar.db.dependency.IssuesDependencyDao; import org.sonar.db.dependency.ProjectDependenciesDao; import org.sonar.db.duplication.DuplicationDao; import org.sonar.db.entity.EntityDao; @@ -204,9 +201,6 @@ public class DbClient { private final ProjectExportDao projectExportDao; private final IssueFixedDao issueFixedDao; private final TelemetryMetricsSentDao telemetryMetricsSentDao; - private final CveDao cveDao; - private final CveCweDao cveCweDao; - private final IssuesDependencyDao issuesDependencyDao; private final ProjectDependenciesDao projectDependenciesDao; public DbClient(Database database, MyBatis myBatis, DBSessions dbSessions, Dao... daos) { @@ -304,9 +298,6 @@ public class DbClient { projectExportDao = getDao(map, ProjectExportDao.class); issueFixedDao = getDao(map, IssueFixedDao.class); telemetryMetricsSentDao = getDao(map, TelemetryMetricsSentDao.class); - cveDao = getDao(map, CveDao.class); - cveCweDao = getDao(map, CveCweDao.class); - issuesDependencyDao = getDao(map, IssuesDependencyDao.class); projectDependenciesDao = getDao(map, ProjectDependenciesDao.class); } @@ -672,18 +663,6 @@ public class DbClient { return projectExportDao; } - public CveDao cveDao() { - return cveDao; - } - - public CveCweDao cveCweDao() { - return cveCweDao; - } - - public IssuesDependencyDao issuesDependencyDao() { - return issuesDependencyDao; - } - public ProjectDependenciesDao projectDependenciesDao() { return projectDependenciesDao; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java index bcfee9920fb..250f51d9729 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java @@ -63,12 +63,6 @@ import org.sonar.db.component.SnapshotDto; import org.sonar.db.component.SnapshotMapper; import org.sonar.db.component.UuidWithBranchUuidDto; import org.sonar.db.component.ViewsSnapshotDto; -import org.sonar.db.dependency.CveCweDto; -import org.sonar.db.dependency.CveCweMapper; -import org.sonar.db.dependency.CveDto; -import org.sonar.db.dependency.CveMapper; -import org.sonar.db.dependency.IssuesDependencyDto; -import org.sonar.db.dependency.IssuesDependencyMapper; import org.sonar.db.dependency.ProjectDependenciesMapper; import org.sonar.db.dependency.ProjectDependencyDto; import org.sonar.db.duplication.DuplicationMapper; @@ -217,8 +211,6 @@ public class MyBatis { confBuilder.loadAlias("AnticipatedTransition", AnticipatedTransitionDto.class); confBuilder.loadAlias("CeTaskCharacteristic", CeTaskCharacteristicDto.class); confBuilder.loadAlias("Component", ComponentDto.class); - confBuilder.loadAlias("Cve", CveDto.class); - confBuilder.loadAlias("CveCwe", CveCweDto.class); confBuilder.loadAlias("DevOpsPermissionsMapping", DevOpsPermissionsMappingDto.class); confBuilder.loadAlias("DuplicationUnit", DuplicationUnitDto.class); confBuilder.loadAlias("Entity", EntityDto.class); @@ -236,7 +228,6 @@ public class MyBatis { confBuilder.loadAlias("KeyLongValue", KeyLongValue.class); confBuilder.loadAlias("Impact", ImpactDto.class); confBuilder.loadAlias("Issue", IssueDto.class); - confBuilder.loadAlias("IssueDependency", IssuesDependencyDto.class); confBuilder.loadAlias("NewCodeReferenceIssue", NewCodeReferenceIssueDto.class); confBuilder.loadAlias("ProjectMeasure", ProjectMeasureDto.class); confBuilder.loadAlias("LargestBranchNclocDto", LargestBranchNclocDto.class); @@ -296,8 +287,6 @@ public class MyBatis { CeTaskMessageMapper.class, ComponentKeyUpdaterMapper.class, ComponentMapper.class, - CveMapper.class, - CveCweMapper.class, DefaultQProfileMapper.class, DuplicationMapper.class, EntityMapper.class, @@ -317,7 +306,6 @@ public class MyBatis { IssueChangeMapper.class, IssueMapper.class, IssueFixedMapper.class, - IssuesDependencyMapper.class, MeasureMapper.class, ProjectMeasureMapper.class, MetricMapper.class, diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDao.java deleted file mode 100644 index 9b2ccb468f5..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDao.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.Set; -import org.sonar.db.Dao; -import org.sonar.db.DbSession; - -public class CveCweDao implements Dao { - - public void insert(DbSession session, CveCweDto cveCweDto) { - mapper(session).insert(cveCweDto); - } - - private static CveCweMapper mapper(DbSession session) { - return session.getMapper(CveCweMapper.class); - } - - public Set<String> selectByCveUuid(DbSession dbSession, String cveUuid) { - return mapper(dbSession).selectByCveUuid(cveUuid); - } - - public void deleteByCveUuid(DbSession dbSession, String cveUuid) { - mapper(dbSession).deleteByCveUuid(cveUuid); - } - -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDto.java deleted file mode 100644 index 5237687287f..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweDto.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -public record CveCweDto(String cveUuid, String cwe) { -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweMapper.java deleted file mode 100644 index 089dac967c5..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveCweMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.Set; - -public interface CveCweMapper { - void insert(CveCweDto cveCweDto); - - Set<String> selectByCveUuid(String cveUuid); - - void deleteByCveUuid(String cveUuid); -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDao.java deleted file mode 100644 index b36bd46a17a..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDao.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import java.util.Optional; -import org.sonar.db.Dao; -import org.sonar.db.DbSession; - -public class CveDao implements Dao { - - public void insert(DbSession dbSession, CveDto cveDto) { - mapper(dbSession).insert(cveDto); - } - - public Optional<CveDto> selectById(DbSession dbSession, String id) { - return Optional.ofNullable(mapper(dbSession).selectById(id)); - } - - public void update(DbSession dbSession, CveDto cveDto) { - mapper(dbSession).update(cveDto); - } - - private static CveMapper mapper(DbSession dbSession) { - return dbSession.getMapper(CveMapper.class); - } -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java deleted file mode 100644 index ad4d2895eb2..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import javax.annotation.Nullable; - -public record CveDto( - String uuid, - String id, - String description, - @Nullable - Double cvssScore, - @Nullable - Double epssScore, - @Nullable - Double epssPercentile, - @Nullable - Long publishedAt, - @Nullable - Long lastModifiedAt, - Long createdAt, - Long updatedAt -) { - -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveMapper.java deleted file mode 100644 index 1f8e29674bc..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -public interface CveMapper { - void insert(CveDto cveDto); - - CveDto selectById(String id); - - void update(CveDto cveDto); -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDao.java deleted file mode 100644 index 8f7e760c99b..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDao.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -import org.sonar.db.Dao; -import org.sonar.db.DbSession; - -public class IssuesDependencyDao implements Dao { - - public void insert(DbSession session, IssuesDependencyDto issuesDependencyDto) { - mapper(session).insert(issuesDependencyDto); - } - - private static IssuesDependencyMapper mapper(DbSession session) { - return session.getMapper(IssuesDependencyMapper.class); - } -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDto.java deleted file mode 100644 index 3c4cf5ab91f..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyDto.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -public record IssuesDependencyDto(String issueUuid, String cveUuid) { -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyMapper.java deleted file mode 100644 index 65b4e306b8a..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/IssuesDependencyMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2025 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.dependency; - -public interface IssuesDependencyMapper { - void insert(IssuesDependencyDto issuesDependencyDto); -} diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java index 43738f43701..61f2b6d96c6 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java @@ -119,9 +119,6 @@ public final class IssueDto implements Serializable { private CleanCodeAttribute cleanCodeAttribute; private CleanCodeAttribute ruleCleanCodeAttribute; - // issues dependency fields, one-one relationship - private String cveId; - public IssueDto() { // nothing to do } @@ -166,8 +163,7 @@ public final class IssueDto implements Serializable { .setPrioritizedRule(issue.isPrioritizedRule()) // technical dates .setCreatedAt(now) - .setUpdatedAt(now) - .setCveId(issue.getCveId()); + .setUpdatedAt(now); issue.getImpacts().forEach(i -> issueDto.addImpact(new ImpactDto(i.softwareQuality(), i.severity(), i.manualSeverity()))); return issueDto; @@ -873,15 +869,6 @@ public final class IssueDto implements Serializable { return this; } - public String getCveId() { - return cveId; - } - - public IssueDto setCveId(@Nullable String cveId) { - this.cveId = cveId; - return this; - } - @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); @@ -925,7 +912,6 @@ public final class IssueDto implements Serializable { issue.setCodeVariants(getCodeVariants()); issue.setCleanCodeAttribute(cleanCodeAttribute); impacts.forEach(i -> issue.addImpact(i.getSoftwareQuality(), i.getSeverity(), i.isManualSeverity())); - issue.setCveId(cveId); return issue; } } diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveCweMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveCweMapper.xml deleted file mode 100644 index b335eac5731..00000000000 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveCweMapper.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd"> -<mapper namespace="org.sonar.db.dependency.CveCweMapper"> - - <insert id="insert" parameterType="org.sonar.db.dependency.CveCweDto" useGeneratedKeys="false"> - insert into cve_cwe ( - cve_uuid, - cwe - ) values ( - #{cveUuid, jdbcType=VARCHAR}, - #{cwe, jdbcType=VARCHAR} - ) - </insert> - - <select id="selectByCveUuid" parameterType="string" resultType="string"> - select cwe - from cve_cwe - where cve_uuid = #{cveUuid,jdbcType=VARCHAR} - </select> - - <delete id="deleteByCveUuid" parameterType="string"> - delete from cve_cwe - where cve_uuid = #{cveUuid,jdbcType=VARCHAR} - </delete> - -</mapper> diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveMapper.xml deleted file mode 100644 index 83d45d500c8..00000000000 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/CveMapper.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd"> -<mapper namespace="org.sonar.db.dependency.CveMapper"> - - <sql id="cveColumns"> - c.uuid as uuid, - c.id as id, - c.description as description, - c.cvss_score as cvssScore, - c.epss_score as epssScore, - c.epss_percentile as epssPercentile, - c.published_at as publishedAt, - c.last_modified_at as lastModifiedAt, - c.created_at as createdAt, - c.updated_at as updatedAt - </sql> - - <insert id="insert" parameterType="Cve" useGeneratedKeys="false"> - insert into cves ( - uuid, - id, - description, - cvss_score, - epss_score, - epss_percentile, - published_at, - last_modified_at, - created_at, - updated_at - ) values ( - #{uuid, jdbcType=VARCHAR}, - #{id, jdbcType=VARCHAR}, - #{description, jdbcType=VARCHAR}, - #{cvssScore, jdbcType=DOUBLE}, - #{epssScore, jdbcType=DOUBLE}, - #{epssPercentile, jdbcType=DOUBLE}, - #{publishedAt, jdbcType=BIGINT}, - #{lastModifiedAt, jdbcType=BIGINT}, - #{createdAt, jdbcType=BIGINT}, - #{updatedAt, jdbcType=BIGINT} - ) - </insert> - - <select id="selectById" parameterType="string" resultType="Cve"> - select <include refid="cveColumns"/> - from - cves c - where - c.id = #{id, jdbcType=VARCHAR} - </select> - - <update id="update" parameterType="Cve" useGeneratedKeys="false"> - update cves - set - id = #{id, jdbcType=VARCHAR}, - description = #{description, jdbcType=VARCHAR}, - cvss_score = #{cvssScore, jdbcType=DOUBLE}, - epss_score = #{epssScore, jdbcType=DOUBLE}, - epss_percentile = #{epssPercentile, jdbcType=DOUBLE}, - published_at = #{publishedAt, jdbcType=BIGINT}, - last_modified_at = #{lastModifiedAt, jdbcType=BIGINT}, - updated_at = #{updatedAt, jdbcType=BIGINT} - where - uuid = #{uuid, jdbcType=BIGINT} - </update> - -</mapper> diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/IssuesDependencyMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/IssuesDependencyMapper.xml deleted file mode 100644 index d6cb24539f3..00000000000 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/dependency/IssuesDependencyMapper.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd"> -<mapper namespace="org.sonar.db.dependency.IssuesDependencyMapper"> - - <insert id="insert" parameterType="org.sonar.db.dependency.IssuesDependencyDto" useGeneratedKeys="false"> - insert into issues_dependency ( - issue_uuid, - cve_uuid - ) values ( - #{issueUuid, jdbcType=VARCHAR}, - #{cveUuid, jdbcType=VARCHAR} - ) - </insert> - -</mapper> diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml index 1515c039681..7a10c9d97d6 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml @@ -45,7 +45,6 @@ i.prioritized_rule as prioritizedRule, <include refid="issueImpactsColumns"/> <include refid="ruleDefaultImpactsColumns"/> - <include refid="issuesDependencyColumns"/> <include refid="isNewCodeReferenceIssue"/> </sql> @@ -127,10 +126,6 @@ rdi.severity as "rdi_severity", </sql> - <sql id="issuesDependencyColumns"> - cve.id as cveId, - </sql> - <resultMap id="issueResultMap" type="Issue" autoMapping="true"> <id property="kee" column="kee"/> @@ -282,8 +277,6 @@ left join new_code_reference_issues n on i.kee = n.issue_key left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where i.kee=#{kee,jdbcType=VARCHAR} </select> @@ -298,8 +291,6 @@ left join new_code_reference_issues n on i.kee = n.issue_key left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where i.component_uuid = #{componentUuid,jdbcType=VARCHAR} and i.status <> 'CLOSED' @@ -328,8 +319,6 @@ i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where i.component_uuid = #{componentUuid,jdbcType=VARCHAR} and i.status = 'CLOSED' @@ -387,7 +376,6 @@ i.prioritized_rule as prioritizedRule, <include refid="issueImpactsColumns"/> <include refid="ruleDefaultImpactsColumns"/> - <include refid="issuesDependencyColumns"/> <include refid="isNewCodeReferenceIssue"/> from issues i inner join rules r on r.uuid = i.rule_uuid @@ -396,8 +384,6 @@ left join new_code_reference_issues n on n.issue_key = i.kee left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid <where> <if test="branchUuid != null"> and c.branch_uuid = #{branchUuid,jdbcType=VARCHAR} and i.project_uuid = #{branchUuid,jdbcType=VARCHAR} @@ -430,8 +416,6 @@ left join new_code_reference_issues n on i.kee = n.issue_key left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where i.kee in <foreach collection="list" open="(" close=")" item="key" separator=","> #{key,jdbcType=VARCHAR} @@ -448,8 +432,6 @@ left join new_code_reference_issues n on i.kee = n.issue_key left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where i.kee in <foreach collection="keys" open="(" close=")" item="key" separator=","> @@ -705,7 +687,6 @@ i.prioritized_rule as prioritizedRule, <include refid="issueImpactsColumns"/> <include refid="ruleDefaultImpactsColumns"/> - <include refid="issuesDependencyColumns"/> i.clean_code_attribute as cleanCodeAttribute, r.clean_code_attribute as ruleCleanCodeAttribute </sql> @@ -720,8 +701,6 @@ left join users u on i.assignee = u.uuid left outer join issues_impacts ii on i.kee = ii.issue_key left outer join rules_default_impacts rdi on r.uuid = rdi.rule_uuid - left join issues_dependency dep on i.kee = dep.issue_uuid - left join cves cve on dep.cve_uuid = cve.uuid where <if test="keys.size() > 0"> i.kee IN diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index a115dead30f..5e13a691d7a 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -250,26 +250,6 @@ CREATE UNIQUE NULLS NOT DISTINCT INDEX "COMPONENTS_UUID" ON "COMPONENTS"("UUID" CREATE INDEX "COMPONENTS_BRANCH_UUID" ON "COMPONENTS"("BRANCH_UUID" NULLS FIRST); CREATE UNIQUE NULLS NOT DISTINCT INDEX "COMPONENTS_KEE_BRANCH_UUID" ON "COMPONENTS"("KEE" NULLS FIRST, "BRANCH_UUID" NULLS FIRST); -CREATE TABLE "CVE_CWE"( - "CVE_UUID" CHARACTER VARYING(40) NOT NULL, - "CWE" CHARACTER VARYING(50) NOT NULL -); -ALTER TABLE "CVE_CWE" ADD CONSTRAINT "PK_CVE_CWE" PRIMARY KEY("CVE_UUID", "CWE"); - -CREATE TABLE "CVES"( - "UUID" CHARACTER VARYING(40) NOT NULL, - "ID" CHARACTER VARYING(50) NOT NULL, - "DESCRIPTION" CHARACTER VARYING(4000) NOT NULL, - "CVSS_SCORE" DOUBLE PRECISION, - "EPSS_SCORE" DOUBLE PRECISION, - "EPSS_PERCENTILE" DOUBLE PRECISION, - "PUBLISHED_AT" BIGINT, - "LAST_MODIFIED_AT" BIGINT, - "CREATED_AT" BIGINT NOT NULL, - "UPDATED_AT" BIGINT NOT NULL -); -ALTER TABLE "CVES" ADD CONSTRAINT "PK_CVES" PRIMARY KEY("UUID"); - CREATE TABLE "DEFAULT_QPROFILES"( "LANGUAGE" CHARACTER VARYING(20) NOT NULL, "QPROFILE_UUID" CHARACTER VARYING(255) NOT NULL, @@ -496,12 +476,6 @@ CREATE INDEX "ISSUES_RESOLUTION" ON "ISSUES"("RESOLUTION" NULLS FIRST); CREATE INDEX "ISSUES_UPDATED_AT" ON "ISSUES"("UPDATED_AT" NULLS FIRST); CREATE INDEX "ISSUES_RULE_UUID" ON "ISSUES"("RULE_UUID" NULLS FIRST); -CREATE TABLE "ISSUES_DEPENDENCY"( - "ISSUE_UUID" CHARACTER VARYING(40) NOT NULL, - "CVE_UUID" CHARACTER VARYING(40) NOT NULL -); -ALTER TABLE "ISSUES_DEPENDENCY" ADD CONSTRAINT "PK_ISSUES_DEPENDENCY" PRIMARY KEY("ISSUE_UUID"); - CREATE TABLE "ISSUES_FIXED"( "PULL_REQUEST_UUID" CHARACTER VARYING(40) NOT NULL, "ISSUE_KEY" CHARACTER VARYING(50) NOT NULL diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java index 2d1a7155aa6..82112928b32 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java @@ -32,7 +32,6 @@ import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; -import org.sonar.db.dependency.IssuesDependencyDto; import org.sonar.db.rule.RuleDto; import org.sonar.db.user.UserDto; @@ -256,9 +255,4 @@ public class IssueDbTester { db.getDbClient().issueDao().insertAsNewCodeOnReferenceBranch(db.getSession(), IssueTesting.newCodeReferenceIssue(issue)); db.commit(); } - - public void insertIssuesDependency(IssuesDependencyDto issuesDependencyDto) { - db.getDbClient().issuesDependencyDao().insert(db.getSession(), issuesDependencyDto); - db.commit(); - } } |