From 59261e5afdbb568045238c90f51afddc6a5ee6ca Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 18 May 2011 09:19:20 +0200 Subject: [PATCH] SONAR-2347 Close review when resource does not exist anymore Decorator should execute only on root projects --- .../org/sonar/plugins/core/sensors/CloseReviewsDecorator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java index 2a729a8e88e..1ee743bacb1 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java @@ -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(); -- 2.39.5