From f0780bc3b1b14bfb4a88379e719d58366668b1a0 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 4 Dec 2014 11:46:43 +0100 Subject: [PATCH] Fix regression concerning SONAR-5878 (task property was released too early) --- .../main/java/org/sonar/batch/bootstrap/TaskContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java index 6edd826ab03..21fd5c214e1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java @@ -76,8 +76,6 @@ public class TaskContainer extends ComponentContainer { void installCoreTasks() { add(new TaskProperties(taskProperties, getParent().getComponentByType(BootstrapProperties.class).property(CoreProperties.ENCRYPTION_SECRET_KEY_PATH))); - // Release memory - taskProperties.clear(); add( ScanTask.DEFINITION, ScanTask.class, ListTask.DEFINITION, ListTask.class, @@ -118,6 +116,8 @@ public class TaskContainer extends ComponentContainer { public void doAfterStart() { // default value is declared in CorePlugin String taskKey = StringUtils.defaultIfEmpty(taskProperties.get(CoreProperties.TASK), CoreProperties.SCAN_TASK); + // Release memory + taskProperties.clear(); TaskDefinition def = getComponentByType(Tasks.class).definition(taskKey); if (def == null) { -- 2.39.5