]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2347 Close review when resource does not exist anymore
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 18 May 2011 07:19:20 +0000 (09:19 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 18 May 2011 07:19:20 +0000 (09:19 +0200)
Decorator should execute only on root projects

plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java

index 2a729a8e88ee4db1faed82301780491f33943a92..1ee743bacb159e4e9fc18e75c0009277ce533d7a 100644 (file)
@@ -63,7 +63,7 @@ public class CloseReviewsDecorator implements Decorator {
       int rowUpdated = query.executeUpdate();
       LOG.debug("- {} reviews set to 'closed' on resource #{}", rowUpdated, resourceId);
 
-      if (ResourceUtils.isProject(resource)) {
+      if (ResourceUtils.isRootProject(resource)) {
         query = databaseSession.createNativeQuery(generateUpdateOnProjectSqlRequest(resourceId, currentSnapshot.getId()));
         query.setParameter(1, Boolean.TRUE);
         rowUpdated = query.executeUpdate();