From 6078d64d4cfb41032b4e17bec32905fa3d219ac3 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 2 Dec 2014 15:54:24 +0100 Subject: SONAR-5804 delete file_sources when deleting a project or during the data cleaning step --- .../main/java/org/sonar/server/component/ComponentCleanerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/sonar-server/src') diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java b/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java index 91c2a08dbf7..b7c65566034 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java @@ -25,6 +25,7 @@ import org.sonar.api.resources.Scopes; import org.sonar.core.component.ComponentDto; import org.sonar.core.persistence.DbSession; import org.sonar.core.persistence.MyBatis; +import org.sonar.core.purge.IdUuidPair; import org.sonar.core.purge.PurgeDao; import org.sonar.server.db.DbClient; import org.sonar.server.issue.index.IssueAuthorizationIndexer; @@ -51,7 +52,7 @@ public class ComponentCleanerService implements ServerComponent { if (!Scopes.PROJECT.equals(project.scope())) { throw new IllegalArgumentException("Only projects can be deleted"); } - purgeDao.deleteResourceTree(project.getId()); + purgeDao.deleteResourceTree(new IdUuidPair(project.getId(), project.uuid())); dbSession.commit(); deleteFromIndices(project.uuid()); -- cgit v1.2.3