From 00739f7d2a336318d176d66e146b073430f25fe7 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 23 Dec 2014 16:19:54 +0100 Subject: [PATCH] SONAR-5995 Remove log on memory leak generated by ProgressLogger when stopping the server --- .../v451/AddMissingCustomRuleParametersMigration.java | 3 +-- .../migrations/v50/PopulateProjectsUuidColumnsMigration.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigration.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigration.java index 42fe1bebb96..5d87dc3f60f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigration.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigration.java @@ -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); diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigration.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigration.java index 4f98335f4d7..f1b414359a5 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigration.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigration.java @@ -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); -- 2.39.5