]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 - Fixed Implicit commits in RuleActivation for methods without Sessions
authorStephane Gamard <stephane.gamard@searchbox.com>
Thu, 12 Jun 2014 18:13:57 +0000 (20:13 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Thu, 12 Jun 2014 18:13:57 +0000 (20:13 +0200)
sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java

index 4e0cd7c9aa818d8cc7984a1e0cf731259f4e56a3..9d3b5eaa9a51d541cb4c7da4897bc2a50bd27031 100644 (file)
@@ -97,6 +97,7 @@ public class RuleActivator implements ServerComponent {
     try {
       return activate(dbSession, activation);
     } finally {
+      dbSession.commit();
       dbSession.close();
     }
   }
@@ -255,6 +256,7 @@ public class RuleActivator implements ServerComponent {
     try {
       return deactivate(dbSession, key);
     } finally {
+      dbSession.commit();
       dbSession.close();
     }
   }
@@ -271,6 +273,7 @@ public class RuleActivator implements ServerComponent {
     try {
       return deactivate(dbSession, ruleDto);
     } finally {
+      dbSession.commit();
       dbSession.close();
     }
   }