From: Teryk Bellahsene Date: Thu, 12 Feb 2015 08:28:32 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/branch-5.0' into fix/merge-5.0 X-Git-Tag: 5.1-RC1~305 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=372cab29ac3ee6afb5615141e11c96ad1cb6540e;p=sonarqube.git Merge remote-tracking branch 'origin/branch-5.0' into fix/merge-5.0 * origin/branch-5.0: SONAR-6130 fix deadlock during purge Conflicts: sonar-core/src/main/java/org/sonar/core/purge/PurgeDao.java sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java --- 372cab29ac3ee6afb5615141e11c96ad1cb6540e diff --cc sonar-core/src/main/java/org/sonar/core/purge/PurgeDao.java index 0e507c10dd6,7a9a796516e..6af3a526fcd --- a/sonar-core/src/main/java/org/sonar/core/purge/PurgeDao.java +++ b/sonar-core/src/main/java/org/sonar/core/purge/PurgeDao.java @@@ -32,13 -32,8 +32,10 @@@ import org.sonar.core.persistence.MyBat import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; - import java.util.Arrays; - import java.util.Collections; - import java.util.Date; - import java.util.List; + import java.util.*; +import static org.sonar.api.utils.DateUtils.dateToLong; + /** * @since 2.14 */ @@@ -133,7 -128,8 +130,8 @@@ public class PurgeDao } private void disableOrphanResources(final ResourceDto project, final SqlSession session, final PurgeMapper purgeMapper, final PurgeListener purgeListener) { + final List componentIdUuids = new ArrayList(); - session.select("org.sonar.core.purge.PurgeMapper.selectResourceIdsToDisable", project.getId(), new ResultHandler() { + session.select("org.sonar.core.purge.PurgeMapper.selectComponentIdUuidsToDisable", project.getId(), new ResultHandler() { @Override public void handleResult(ResultContext resultContext) { IdUuidPair componentIdUuid = (IdUuidPair) resultContext.getResultObject();