]> source.dussan.org Git - sonarqube.git/commitdiff
Merge remote-tracking branch 'origin/branch-5.0' into fix/merge-5.0
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 12 Feb 2015 08:28:32 +0000 (09:28 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 12 Feb 2015 08:28:32 +0000 (09:28 +0100)
* 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

1  2 
sonar-core/src/main/java/org/sonar/core/purge/PurgeDao.java

index 0e507c10dd63c01362c50ef9070eca6dc68e0ee7,7a9a796516eb7d1bd12cf04202f50f82cd633b3a..6af3a526fcd0cffefef8e3cb682d400a67f54a44
@@@ -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) {
 -    session.select("org.sonar.core.purge.PurgeMapper.selectResourceIdsToDisable", project.getId(), new ResultHandler() {
+     final List<IdUuidPair> componentIdUuids = new ArrayList<IdUuidPair>();
 +    session.select("org.sonar.core.purge.PurgeMapper.selectComponentIdUuidsToDisable", project.getId(), new ResultHandler() {
        @Override
        public void handleResult(ResultContext resultContext) {
          IdUuidPair componentIdUuid = (IdUuidPair) resultContext.getResultObject();