]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5995 Remove log on memory leak generated by ProgressLogger when stopping the...
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 23 Dec 2014 15:19:54 +0000 (16:19 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 23 Dec 2014 15:40:10 +0000 (16:40 +0100)
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigration.java
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigration.java

index 42fe1bebb96e333fcf9f1eeded72565e87e480c8..5d87dc3f60f9f34ec3df286fe6aab23b975f6741 100644 (file)
@@ -51,9 +51,7 @@ public class AddMissingCustomRuleParametersMigration implements DatabaseMigratio
 
   private final DbClient db;
   private final System2 system;
-
   private final AtomicLong counter = new AtomicLong(0L);
-  private final ProgressLogger progress = ProgressLogger.create(getClass(), counter);
 
   public AddMissingCustomRuleParametersMigration(DbClient db, System2 system) {
     this.db = db;
@@ -62,6 +60,7 @@ public class AddMissingCustomRuleParametersMigration implements DatabaseMigratio
 
   @Override
   public void execute() {
+    ProgressLogger progress = ProgressLogger.create(getClass(), counter);
     progress.start();
 
     DbSession session = db.openSession(false);
index 4f98335f4d76aaa8ce8c67015feef0c9d495a5f7..f1b414359a5e9a66eb2c617eef16f0e0f3df7647 100644 (file)
@@ -49,7 +49,6 @@ public class PopulateProjectsUuidColumnsMigration implements DatabaseMigration {
 
   private final DbClient db;
   private final AtomicLong counter = new AtomicLong(0L);
-  private final ProgressLogger progress = ProgressLogger.create(getClass(), counter);
 
   public PopulateProjectsUuidColumnsMigration(DbClient db) {
     this.db = db;
@@ -57,6 +56,7 @@ public class PopulateProjectsUuidColumnsMigration implements DatabaseMigration {
 
   @Override
   public void execute() {
+    ProgressLogger progress = ProgressLogger.create(getClass(), counter);
     progress.start();
 
     final DbSession readSession = db.openSession(false);